Storing Text using ASCII (Assignment) 1
Storing Text using ASCII (Assignment) 1
Character T h a n t
Decimal 84 104 97 110 116
binary 0101 0100 0110 1000 0110 0001 0110 1110 0111 0100
3. Converting binary to decimal.
1001 1110
0 x 64 = 0
0 x 32 = 0
1 x 16 = 16
1x8=8
1x4=4
1x2=2
0x1=0
128 + 16 + 8 + 4 + 2 = 158
0011 0111
0 x 64 = 0
1 x 32 = 32
1 x 16 = 16
0x8=0
1x4=4
1x2=2
1x1=1
32 + 16 + 4 + 2 + 1 = 55
112 – 64 = 48
48 – 32 = 16
16 – 16 = 0
150
22 – 16 = 6
6–4=2
2–2=0
68
4–4=0
In carry of last column, there is value of 1 which means the sum value is more than 255 in 8 digits so it
has overflow error.
In carry of last column, there is value of 1 which means the sum value is more than 255 in 8 digits so it
has overflow error.