Denary | Binary | Hexadecimal |
---|---|---|
0 | 0000 | 0 |
1 | 0001 | 1 |
2 | 0010 | 2 |
3 | 0011 | 3 |
4 | 0100 | 4 |
5 | 0101 | 5 |
6 | 0110 | 6 |
7 | 0111 | 7 |
8 | 1000 | 8 |
9 | 1001 | 9 |
10 | 1010 | A |
11 | 1011 | B |
12 | 1100 | C |
13 | 1101 | D |
14 | 1110 | E |
15 | 1111 | F |
16 | 0001 0000 | G |
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.
Thousands | Hundreds | Tens | Units |
---|---|---|---|
10^3 | 10^2 | 10^1 | 10^0 |
1000 | 100 | 10 | 1 |
5 | 9 | 7 | 3 |
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-eights | Sixty-fours | Thirty-twos | Sixteens | Eights | Fours | Twos | Units |
---|---|---|---|---|---|---|---|
2^7 | 2^6 | 2^5 | 2^4 | 2^3 | 2^2 | 2^1 | 2^0 |
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
0 | 1 | 1 | 0 | 1 | 0 | 1 | 0 |
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
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 0 | 0 | 1 | 1 | 1 | 1 | 1 |
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 :
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 1 | 1 | 0 | 0 |
8+4 = 1210
010110012
Answer :
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 1 | 0 | 1 | 1 | 0 | 0 | 1 |
64 + 16 + 8 + 1 = 8910
000001112
Answer :
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 0 | 0 | 0 | 0 | 1 | 1 | 1 |
4 + 2 + 1 = 710
010101012
Answer :
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 1 | 0 | 1 | 0 | 1 | 0 | 1 |
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
128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
---|---|---|---|---|---|---|---|
0 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
= 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