Monday 28 March 2011

Bit Patterns & The Binary Number System

To represent binary we use a to the power of 2 scale or measurment. So from 1,2,4,8,16,32,64,128 and doubles each time. We read it from right to left so the opposite to how i just wrote it, so 49 would be represented as 00110001.
To add Binary we can use the old primary school method of addition by putting one binary number above another and adding them that way which makes things easier. If a zero and zero are added then we put down a 0 and move on. If a one and zero are added the result is 1 and dont carry anything. If a one and one are added then the result is 1 and no carry, but if three ones are added then we put down 1 and carry a 1. 

Multiplying numbers, we change all the 1s to 0s from the original binary code then we add a 0 to the end of the code. Finally convert the binary to denary.
To subtract we have to use the two's complement method to convert the number we are subtracting into negative then add them like normal binary numbers.

1 comment: