Codes Octal Power Hexadecimal ASCII BCD Code 83 82 81 80 83 82 81 80 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 0 1 2 3 4 5 6 7 8 9 A B C D E F
Code conversions Similar to Dec-to Binary: Start dividing by 8 Decimal to Octal Similar to Dec-to Binary: Start dividing by 8 and build Octal figures from Remainders: 24010=3608 8 240 30 3 6
Code conversions Binary –to-Octal 3 bits of binary could provide weight of 810, that is equivalent to Octal;i.e: Bits: b2 b1 b0 Wts: 4 2 1 Bin: 1 1 1 710 and Octal range 0-7 Example: 100111010= 100 111 010 Octal Values: 4 7 2
Octal Conversion binary: Octal: 011 010 1102 3268 3 2 6 256 128 64 32 16 8 4 2 1 3 x 82 + 2 x 81 + 6 x 80
Binary Addition 1110 1410 10111110 110 012510 1001 1110 101011 110110
Octal Addition 3458 +2368 =6038 Justification….. 3458=22910 and 2368=15810 22910+15810 = 38710 and 6038=3+6x64=38710
BCD Addition 1000 + 1001 =0001 0111
Byte Most computers handle and store binary data and information in groups of eight bits, so a special name is given to a string of 8 bits..Byte. A Byte therefore always consists of eight bits data. A 32 bits data has 4 Bytes of data and similarly 128 bits of data has 16 Bytes.
Questions What is the largest decimal value that can be represented in a binary using two bytes? How many bytes are needed to represent the decimal value of 846,569 in BCD?
Assignment 1 Convert binary into decimals: 10110 10001101 100100001001 Convert decimal into Binary: 37 14 189
Assignment 1 What is the largest decimal value that can be represented by an eight-bit binary number? Convert each Octal into Binary: 743 256 1204