1 / 26

L 4.2 Computer Number System Conversions

Computer number system conversions involve changing numbers between different numeral systems. Binary to Decimal is done by multiplying each binary digit by powers of 2, while Decimal to Binary involves repeated division by 2. Binary to Octal/Hexadecimal is done by grouping binary digits into sets of three (Octal) or four (Hex). Similarly, Octal/Hex to Binary converts each digit into its binary equivalent. These conversions are essential in computing and digital electronics.

Anita101
Download Presentation

L 4.2 Computer Number System Conversions

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. Number Systems Conversions in Computer Dr Anita Choudhary Assistant Professor Department of Computer Science anitach312@gmail.com

  2. Table of Content

  3. Divide by 8 Conversion among Bases Decimal Octal Multiply each bit by 8n 3-bit equivalent binary representation Divide by 16 • Group bits in threes, starting on right Multiply each bit by 16n 3-bit equivalent binary representation 4-bit equivalent binary representation • Multiply each bit by 2n Divide by 2 Binary Hexadecimal • Group bits in four, starting on right 4-bit equivalent binary representation • Note: n is the “weight” of the bit • The weight is the position of the bit, starting from 0 on the right

  4. DecimaltoOctal Decimal Octal Binary Hexadecimal

  5. DecimaltoOctal • Technique • Divide by 8 • Keep track of the remainder

  6. 8 19 2 8 2 3 8 0 2 Example 123410 = ?8 8 1234 154 2 123410 = 23228

  7. DecimaltoHexadecimal Decimal Octal Binary Hexadecimal

  8. DecimaltoHexadecimal • Technique • Divide by 16 • Keep track of the remainder

  9. 16 1234 77 2 16 4 13 = D 16 0 4 Example 123410 = ?16 123410 = 4D216

  10. BinarytoOctal Decimal Octal Binary Hexadecimal

  11. BinarytoOctal • Technique • Group bits in threes, starting on right • Convert to octal digits

  12. 1 011 010 111 1 3 2 7 Example 10110101112 = ?8 10110101112 = 13278

  13. BinarytoHexadecimal Decimal Octal Binary Hexadecimal

  14. BinarytoHexadecimal • Technique • Group bits in fours, starting on right • Convert to hexadecimal digits

  15. Example 10101110112 = ?16 • 10 1011 1011 • B B 10101110112 = 2BB16

  16. OctaltoHexadecimal Decimal Octal Binary Hexadecimal

  17. OctaltoHexadecimal • Technique • Use binary as an intermediary

  18. 1 0 7 6 • 001 000 111 110 2 3 E Example 10768 = ?16 10768 = 23E16

  19. HexadecimaltoOctal Decimal Octal Binary Hexadecimal

  20. HexadecimaltoOctal • Technique • Use binary as an intermediary

  21. 1 F 0 C • 0001 1111 0000 1100 1 7 4 1 4 Example 1F0C16 = ?8 1F0C16 = 174148

  22. Example

  23. CommonPowers(1 of 2) Base 10

  24. CommonPowers(2 of 2) • What is the value of “k”, “M”, and “G”? • In computing, particularly w.r.t. memory, the base-2 interpretation generally applies. Base 2

  25. Thank you

More Related