SECTION 3: Arithmetic and
Conversions in number systems.
SYED MUHAMMAD ASHHAD IQBAL 24k-0655
5.
Convert the following numbers from decimal to binary, octal, and hexadecimal:
156, 1024, 255.
156
2 156
78 2 - 0
2 39 -0 BINARY: 10011100
2 19 -1
2 9 -1
2 4 -1
2 2 -0
1 -0
0 1 0 0 1 1 1 0 0
4 2 1 4 2 1 4 2 1
OCTAL: 234
1 0 0 1 1 1 0 0
8 4 2 1 8 4 2 1
HEXADECIMAL: 9 12
: 9C
1024
2 1024
5122 -0
2 256 -0 BINARY: 10000000000
2 128 -0
2 64 -0
2 32 -0
2 16 -0
2 8 -0
2 4 -0
2 2 -0
1 -0
0 1 0 0 0 0 0 0 0 0 0 0
4 2 1 4 2 1 4 2 1 4 2 1
OCTAL: 2000
0 1 0 0 0 0 0 0 0 0 0 0
8 4 2 1 8 4 2 1 8 4 2 1
HEXADECIMAL: 400
255
2 255
1272 -1
2 63 -1 BINARY: 11111111
2 31 -1
2 15 -1
2 7 -1
2 3 -1
2 1 -1
0 1 1 1 1 1 1 1 1
4 2 1 4 2 1 4 2 1
OCTAL: 377
1 1 1 1 1 1 1 1
8 4 2 1 8 4 2 1
HEXADECIMAL: 15 15
: FF
Perform binary addition and subtraction on the following pairs of numbers:
101101 + 11011:
*for understanding
101101
0+0=0
+ 011011
1001000 0+1=1
1+1=10
111001 - 1001: 1+1+1=11
111001
- 001001
110000
Explain how to convert a fractional binary number (e.g., 110.101) to
its decimal equivalent
Convert the integer part (110)
(1×22) + (1×21) + (0×20) = 4+ 2 + 0 = 6
Convert the fractional part (0.101)
(1×2−1) + (0×2−2) + (1×2−3) = 0.5 + 0+ 0.125 = 0.625
Add both
6 + 0.625 = 6.625
So, 110.101 (binary) equals 6.625 (decimal).