Sunday, May 19, 2013

Binary Number System




DenaryBinaryHexadecimal
000000
100011
200102
300113
401004
501015
601106
701117
810008
910019
101010A
111011B
121100C
131101D
141110E
151111F
160001 0000G

Denary/Decimal 
Denary is the number system that you have most probably grown up with. It is also another way of saying base-10. This means that there are 10 different numbers that you can use for each digit, namely:

0,1,2,3,4,5,6,7,8,9
Notice that if we wish to say 'ten', we use two of the numbers from the above digits, 1 and 0.
ThousandsHundredsTensUnits
10^310^210^110^0
1000100101
5973
Using the above table we can see that each column has a different value assigned to it. And if we know the column values we can know the number, this will be very useful when we start looking at other base systems. Obviously, the number above is: five-thousands, nine-hundreds, seven-tens and three-units.
5*1000 + 9*100 + 7*10 + 3*1 = 597310

Binary 
You should know denary pretty well by your age, but there are different base systems out there, and the most important one for computing is the binary base system. Binary is a base-2 number system, this means that there are two numbers that you can write for each digit:

0, 1
With these two numbers we should be able to write (or make an approximation) of all the numbers that we could write in denary.
One-hundred and twenty-eightsSixty-foursThirty-twosSixteensEightsFoursTwosUnits
2^72^62^52^42^32^22^12^0
1286432168421
01101010
Using the above table we can see that each column has a value assigned to it that is the power of two (the base number!), and if we take those values and the corresponding digits we can work out the value of the number: 1*64 + 1*32 + 1*8 + 1*2 = 106.
If you are asked to work out the value of a binary number, the best place to start is by labelling each column with its corresponding value and adding together all the columns that hold a 1. Let's take a look at another example:
000111112
1286432168421
00011111
So now all we need to do is to add the columns containing 1s together: 1*16 + 1*8 + 1*4 + 1*2 + 1*1 = 31


Convert the following binary numbers into denary
000011002
  
Answer :
1286432168421
00001100
8+4 = 1210
010110012
 
Answer :
1286432168421
01011001
64 + 16 + 8 + 1 = 8910
000001112
  
Answer :
1286432168421
00000111
4 + 2 + 1 = 710
010101012
 
Answer :
1286432168421
01010101
64 + 16 + 4 + 1 = 8510
How do we tell if a binary number is odd?
  
Answer :
It's right most digit is a one
Is there a short cut to working out a binary number that is made of solid ones, such as: 011111112
  
Answer :
Yes, take the first 0's column value and minus one
1286432168421
01111111
= 128 - 1 = 127 = 64 + 32 + 16 + 8 + 4 + 2 + 1
000011112 = 16 - 1 = 15 = 8 + 4 + 2 + 1
000001112 = 8 - 1 = 7 = 4 + 2 + 1
If we were to use octal, a base 8 number system, list the different numbers each digit could take:
  
Answer :
0, 1, 2, 3, 4, 5, 6, 7


No comments:

Post a Comment