Lecture Slides on Computer System Design unit 1


Binary Representation Base 2 Number Representation 01101010.1001101


Download 293.03 Kb.
bet2/4
Sana23.03.2023
Hajmi293.03 Kb.
#1287852
1   2   3   4
Bog'liq
SOC2040 SP WEEK 3 LECTURE SLIDES ON DATA REPRESENTATION SPRING 2023

Binary Representation

  • Base 2 Number Representation
  • 01101010.1001101

    27 26 25 24 23 22 21 20 2-1 2-2 2-3 2-4 2-5 2-6 2-7

    Bit position values

    = 0x 27 + 1 x 26 + 1 x 25 + 0 x 24 + 1 x 23 + 0x 22 + 1 x 21 + 0 x 20 + 1 x 2-1 + 0 x 2-2 + 0 x 2-3 + 1 x 2-4 + 1 x 2-5 + 0 x 2-6 + 1 x 2-7

    = 0 + 64 + 32 + 0 + 8 + 0 + 2 + 0 + 0.5 + 0 + 0 + 0.0625+ 0.03125 + 0 + 0.0078125

    =106.6015625


7 6 5 4 3 2 1 0 -1 -2 -3 -4 -5 -6 -7
Bit
position
11011010.10101011
= 1 x 27 + 1 x 26 + 0 x 25 + 1 x 24 + 1 x 23 + 0 x 22 + 1 x 21 + 0x 20 + 1 x 2-1 +
0 x 2-2 + 1 x 2-3 + 0 x 2-4 + 1 x 2-5 + 0 x 2-6 + 1 x 2-7 + 1 x 2-8
= + 128 + 64 + 0 + 16 + 8 + 0 + 2 + 0 + 0.5 + 0 + 0.125 + 0 + 0.03125 + 0 + 0.0078125 + 0.00390625
= 218.66796875
10111010110110110101.1011011011110110
= 1 x219 +0 x218 +1 x217 + 1 x216 +1 x215 +0 x214 +1 x213 + 0 x212 + 1 x211 + 1 x210 + 0 x29 +
1 x28 +1 x27 +0 x26 + 1 x25 + 1 x24 + 0 x23 + 1 x22 + 0 x21 + 1 x20 + 1 x 2-1 + 0 x 2-2 +
1 x 2-3 + 1 x 2-4 + 0 x 2-5 + 1 x 2-6 + 1 x 2-7 + 0 x 2-8 + 1 x 2-9 + 1 x 2-10 + 1 x 2-11 + 1 x 2-12 +
0 x 2-13 + 1 x 2-14 + 1 x 2-15 + 0 x 2-16
= 5242288+ 0+ 131072 +65536 + 32768 + 0 + 8192 + 0 + 2048 + 1024 + 0 + 256 + 128+ 0 +
32 + 16 + 0 + 4 + 0 +1 + 0.5 + 0 + 0.125 + 0.0625 + 0 + .015625 + 0.0078125 + 0 +
0.001953125 + 0.0009765625 + 0.00048828125 + 0.000244140625 + 0.0001220703125 +
0.00006103515625 + 0.000030517578125 + 0.0000152587890625
= 43702.7460479736328125
 
Convert Binary to Decimal

2|106 .
2| 53 - 0
2| 26 - 1
2| 13 - 0
2| 6 - 1
2| 3 - 0
2| 1 - 1
2| 0 - 1
= 1101010


0.6015625 x 2
1.2031250 x 2 - 1
0.4062500 x 2 - 0
0.8125000 x 2 - 0
1.6250000 x 2 - 1
1.2500000 x 2 - 1
0.5000000 x 2 - 0
1.0000000 x 2 - 1

Download 293.03 Kb.

Do'stlaringiz bilan baham:
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling