Binary; The Basics (a)
Computers are based on switches that have 2 states; On and Off.
These 8 Binary Digits or (Bits) make up 1 byte
4 Step Process
Use the above table. Start with the largest position (far left)
Then try and put the remainder in the next position.
If it is too small move right to the next position.
Repeat the process untill there is no remainder
Try this: Cisco Binary Game
Binary Coded decimal (BCD)
(Think of a Light bulb ) - This is represented by the numbers 1 for On and
0 (zero) for off.
We are used to Denary or base 10
Here the columns go up in value in multiples of 10
Remember these columns from Primary school?
In Binary the columns go up in value by 2.
Using blocks of 4 binary digits (4 bits = 1 nibble) to represent numbers. The smallest value a nibble can hold is 0000 in binary and the largest number is 1111 in binary. (0000 in binary is the same as 0 in denary.
1111 in binary is the same as (1 x 8) + (1 x 4) + (1 x 2) + (1 x 1) or 15 in denary.
So 167 would be represented as:
See the table on the right for conversion of decimal to BCD or BCD to decimal is similar to the conversion of hexadecimal to binary and vice versa.
To convert 26410 to BCD.
Use the block format that you used in earlier conversions.
Write out the decimal number to be converted;
below each digit write the BCD equivalent of that digit:
The BCD equivalent of 26410 is 001001100100BCD.
To convert from BCD to decimal,
Simply reverse above the process as shown:
....
This numbering system uses base 16. Numbers above 9 are represented by letters.
As shown on the right.
256
1
16
4
Units
B
Using the above involves a lot of counting and is quite long winded.
Another way is to convert the Denary to Binary, split the byte into 2 nibbles and write these in Hex.
Example 12510
1. Convert to Binary
2. Split the Binary in half into 2 nibbles
and add up each half in Denary
=7 =13
3. Using the Hex table table. 710 = D16
4. Put them back together and 12510 = 7D16
Further Reading
If you have either missed the lesson, not grasped part of it or need to revise.
More links to come