Download presentation
1
2.2 General Positional-Number-System Conversion
Binary, octal or hexadecimal to decimal Examples Return Next
2
2.2 General Positional-Number-System Conversion
Decimal to binary, octal or hexadecimal When D is a integer Return Back Next
3
2.2 General Positional-Number-System Conversion
Divide D by r the remainder will be c0. Furthermore, the quotient Q has the same form as the oriental D. Therefore, successive divisions by 2 yield successive digits ci of D from right to left, until all the digits of d have been derived. Return Back Next
4
2.2 General Positional-Number-System Conversion
Examples 252=12 remainder 1 c0 2=6 remainder 0 c1 2=3 remainder 0 c2 2=1 remainder 1 c3 2=0 remainder 1 c4 2510=110012 Return Back Next
5
2.2 General Positional-Number-System Conversion
Simply 8 22 (3 179 2 89 (1 179 (LSB) 8 2 (6 8 (2 2 44 (1 2 22 (0 2 11 (0 17910=2638 2 5 (1 2 (1 16 11 (3 179 1 2 (0 16 (B 2 (1 (MSB) 17910=B316 17910= Return Back Next
6
2.2 General Positional-Number-System Conversion
When D is a fraction Multiply D by r. Return Back Next
7
2.2 General Positional-Number-System Conversion
The integer will be c-1. Furthermore, the fraction of the product P has the same form as the oriental D. Therefore, successive multiply by r yield successive digits c-i of D from left to right, until the error is satisfying. . Examples 0.625 2= integer 1 c-1 2= integer 0 c-2 2= integer 1 c-3 =0.1012 Return Back Next
8
2.2 General Positional-Number-System Conversion
Converting with six significant digits. 0.7262 0.7268 1) 2 5) 8 0) 2 6) 8 1) 2 3) 8 1) 2 5) 8 1) 2 5) 8 0) 4) Return Back Next
9
2.2 General Positional-Number-System Conversion
Binary to octal or hexadecimal Examples = = 43168 = = 8CE16 = = = = 2.B216 Octal or hexadecimal to binary Examples 5.678= 3.A516= Return Back Next
10
2.2 General Positional-Number-System Conversion
bit, byte, word, and nibble bit –– one binary digit is called bit. byte –– 8 binary digits is called byte. word –– n-bit word means one word has n binary digits. nibble –– 4-bit or half-byte is called nibble. Example A hexadecimal number is 5678ABCD16 . How many binary digits has it? How many 8-bit bytes has it? What is the hexadecimal value of every 8-bit byte? How many 2-byte words has it? How many 32-bit words has it? Return Back Next
11
2.2 General Positional-Number-System Conversion
Answer 5678ABCD16 = It has 32 binary digits. It has four 8-bit bytes. The hexadecimal values of four 8-bit bytes are 5616, 7816, AB16, CD16. It has two 2-byte words. It has one 32-bit word. A file’s size is 20bytes. How many 1-bit memory units need for saving this file? If a file’s size is 1kbytes? Return Back
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.