1 / 11

Codes

Codes. Octal  Power Hexadecimal ASCII BCD Code. 8 3 8 2 8 1 8 0. 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.

Télécharger la présentation

Codes

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Codes • Octal Power • Hexadecimal • ASCII • BCD Code 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

  2. Code conversions Decimal to Octal Similar to Dec-to Binary: Start dividing by 8 and build Octal figures from Remainders: 24010=3608

  3. 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 range0-7 Example: 100111010= 100 111 010 Octal Values: 4 7 2

  4. 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

  5. Binary Addition 11101410 10111110 110 012510 1001 1110 101011 110110

  6. Octal Addition 3458 +2368 =6038 Justification….. 3458=22910 and 2368=15810 22910+15810 = 38710 and 6038=3+6x64=38710

  7. BCD Addition 1000 + 1001 =0001 0111

  8. 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 16Bytes.

  9. 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?

  10. Assignment 1 • Convert binary into decimals: • 10110 • 10001101 • 100100001001 • Convert decimal into Binary: • 37 • 14 • 189

  11. 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

More Related