BCD and Octal

 

      BCD is another form of writing numbers, based on binary. The way decimal is converted to BCD is this; every digit in the decimal number is replaced by its binary counterpart, using four binary digits. If we take the number 2, whose binary number is 10, it's form in BCD is 0010. The extra two 0's are there to make it four digits long.

      The following table shows the process of converting. Lets convert the number 149. We take the digits, 1, 4, and 9, and change them to their BCD binary counterparts - 0001, 0100, and 1001, and put them together to form 000101001001. Simple.

 

Converting decimal to BCD

1 4 9 Decimal
1 100 1001 Binary
0001       -       0100       -       1001           = BCD Form

 

      Octal numbers are similar in a way to hexadecimal, in the way that for hexadecimal, there are sixteen digits, but in octal there are eight - 0 to 7. If you know to work with hexadecimal, then you can imagine how octal works. If we take the decimal number 314, we can convert it to binary - it ends up being 100111010. We take it in segments of 3, leaving 100, 111, and 010. Simply take the decimal number of each of those segments - which are 4, 7, and 2 and put them together to form 472. And that's it. So, 314 decimal = 472 octal.

      To convert it back, just do the opposite. Find the binary of each octal digit, and place them together to have the whole binary number, then convert this binary to decimal, and that's it!

      Next we will deal with addition of binary numbers! Yahoo!

 

Binary Arithmetic