Lecture Slides on Computer System Design unit 1
= .1001101 Convert Decimal 106.6015625 to Binary
Download 293.03 Kb.
|
SOC2040 SP WEEK 3 LECTURE SLIDES ON DATA REPRESENTATION SPRING 2023
- Bu sahifa navigatsiya:
- Binary Representation Base 2 Number Representation
- Hexadecimal Number System
- Example : Binary ( 10110101)2 is Hex (B5)16
- = 13 x 16 + 7 x 1 = (215)10
- Octal Number System
- 6 110 7 111 Example
- = 192 + 16 + 7 = (215)10
= .1001101
Convert Decimal 106.6015625 to Binary 106.6015625 = 1101010.1001101
Convert Decimal 985.78357 to Binary 985.78357= 1111011001.1100100010011000 Binary Representation
Determine x in 104 = 2x 104 = 2x log2104 = log2 2x 4 log210 = x log2 2 where log2 2 = 1 4 * 3.3219 = x where log210 = 3.32192809489 x = 13 Or 104 = 213 Determine x in 10x = 213 10x = 213 log1010x = log10 213 x log1010 = 13 log10 2 where log1010 = 1 x = 13*0.301 where log10 2 = 0.301029995664 x = 4 Or 104 = 213 Hexadecimal Number System
0,1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, FHex Number Binary coded hex0 00001 00012 00103 00114 01005 01016 01107 01118 10009 1001A 1010B 1011C 1100D 1101E 1110F 1111Example : Binary ( 10110101)2 is Hex (B5)16Hexadecimal Number System
= 13 x 16 + 7 x 1 = (215)1016|215 . 16| 13 - 7 16| 0 - D Encoding Byte Values
a = 0xfa1d37b; b=100; decimalb=0x100; hexadecimal = 256 decimal0 0 0000 1 1 0001 2 2 0010 3 3 0011 4 4 0100 5 5 0101 6 6 0110 7 7 0111 8 8 1000 9 9 1001 A 10 1010 B 11 1011 C 12 1100 D 13 1101 E 14 1110 F 15 1111 Hex Decimal Binary Octal Number System
Octal Number Binary coded Octal0 0001 0012 0103 0114 1005 1016 1107 111Example : Binary (100111101)2 is octal (475)8Octal Number System
= 192 + 16 + 7 = (215)108|215 . 8| 26 - 7 8| 3 - 2 8| 0 - 3 Convert 0x879CEF to (i) Binary (ii) Decimal & (iii) Octal (i) HEX2BIN(0x879CEF) = (1000011110011100 11101111)2
= 8 x 165 + 7 x 164 + 9 x 163 + C x 162 + E x 161 + F x 160 = 8 x 1048576 + 7 x 65536+ 9 x 4096 + 12 x 256 + 14 x 16 + 15 x 1 = 8388608 + 458752 + 36864 + 3072 + 224 + 15 = 8887535 (iii) HEX2OCT(0x879CEF) = 100001111001110011101111 = (41716357)8 Convert 0x4BAD6CAB to (i) Binary (ii) Decimal & (iii) Octal (i) HEX2BIN(0x4BAD6CAB) = 01001011101011010110110010101011
= 4 x 167 + B x 166 + A x 165 + D x 164 + 6 x 163 + C x 162 + A x 161 + B x 160 = 4 x 268435456 + 11 x 16777216 + 10 x 1048576 + 13 x 65536 + 6 x 4096 + 12 x 256 + 10 x 16 + 11 x 1 = +1073741824 + 184549376 + 10485760 + 851968 + 24576 +3072 + 160 +11 = 1269656747 (iii) HEX2OCT(0x4BAD6CAB) = 01001011101011010110110010101011= (11353266253)8 Convert Octal 36745412 to (i) Binary (ii) Decimal & (iii) Hexadecimal (i)OCT2BIN(36745412) = 011110111100101100001010 (ii)OCT2DEC(36745412) = 3 x 87 + 6 x 86 + 7 x 85 + 4 x 84 + 5 x 83 + 4 x 82 + 1 x 81 + 2 x 80 = 3 x 2097152+6 x 262144+ 7 x 32768+4 x 4096+5 x 512 + 4 x 64 + 1x8 + 2 = 6291456 + 1572864 + 229376 + 16384 + 2560 + 256 + 10 = 8112906 (iii) OCT2HEX(36745412) = 0111 1011 1100 1011 0000 1010= 0x7BCB0A Convert Octal 753642532452 to (i) Binary (ii) Decimal & (iii) Hexadecimal
= 7 x 811 + 5 x 810 + 3 x 89 + 6 x 88 + 4 x 87 + 2 x 86 + 5 x 85 + 3 x 84 + 2 x 83 + 4 x 82 + 5 x 81 + 2 x 80 = 7*8589934592 + + 5*1073741824 + 3* 134217728 + 6 x 16777216 + 4 x 2097152 + 2 x 262144 + 5 x 32768 + 3 x 4096 + 2 x 512 + 4 x 64 + 5 x 8+ 2 = 60129542144 + 5368709120 + 402653184 + 100663296 + 8388608 + 524288+ 163840 + 12288 + 1024 + 256 + 40 +2 = 66010658090 = 111101011110100010101011010100101010 = 0xF5E8AB52A Data Representations
Download 293.03 Kb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling