October 10, 2024 Computing Fundamentals: Assignment 01
NAME: Muneeb Ul Rehman
Enrollment No: 09-239242-083
Class: RIS 1B
Subject Title : Conversion Of
Decimals Into BINARY,OCTA and
HEXA
1
October 10, 2024 Computing Fundamentals: Assignment 01
QUESTIONS
1.Express the following numbers in decimal: (10110.0101) , (16.5)
2 16, and (26.24)8.
SOLUTION
(10110.0101)₂
=1x2⁴+0x2³+1x2²+1x2¹+0x2⁰+0x2⁻¹+1x2⁻²+0x2⁻³+1x2⁻⁴
=16+0+4+2+0+0+0.25+0+0.0625
=22.3125
=(10110.0101)₂=( 22.3125)₁₀
Reason: To convert a binary number to a decimal number, we
need to expand it according to the powers of 2. The digits to the
left of the decimal point are multiplied by positive powers of 2.
The digits to the right of the decimal point are multiplied by
negative powers of 2.
(16.5)16
=1x16¹+6x16⁰+5x16⁻¹
=16+6+0.3125
=22.3125
(16.5)16 =( 22.3125)₁₀
2
October 10, 2024 Computing Fundamentals: Assignment 01
Reason: To convert a hexadecimal number to a decimal number,
we expand it using the powers of 16. The digits to the left of the
decimal point are multiplied by positive powers of 16. The digits
to the right of the decimal point are multiplied by negative
powers of 16.
(26.24)8
=2x8¹+6x8⁰+2x8⁻¹+4x8⁻²
=16+6+0.25+0.0625
=22.3125
(26.24)8 =( 22.3125)₁₀
2. Convert the following into BIN numbers.
(a) (5256)10
(b) (366)8
(c) (1A)16
SOLUTION
(a) (5256)10
2 5256
2 2658-0
3
October 10, 2024 Computing Fundamentals: Assignment 01
2 1314-0
2 657-0
2 328-1
2 164-0
2 82-0
2 41-0
2 20-1
2 10-0
2 5-0
2 2-1
2 1-0
(5256)10 = (1010010001000)2
Reason: To convert a decimal number to binary, we divide
the number by 2 and keep track of the remainders.
(b) (366)8
Reason: We Will Use Place Value Method to Convert Into
BINARY.
(366)8 = 3x82+6x81+6x80
= 192+48+6 = 246
= (246)10
2 246
2 123-0
2 61-1
2 30-1
2 15-0
4
October 10, 2024 Computing Fundamentals: Assignment 01
2 7-1
2 3-1
1-1
(336)8 = (11110110)2
(c) (1A)16
Reason: In hexadecimal number the values continue with the
letters A to F, which represent the decimal values 10 to 15
• A=10
• B=11
• C=12
• D=13
• E=14
• F=15
(1A)16 = 1x161+Ax160
= 1 x 161 + 10 x 160
=26 = (26)10
2 26
2 13-0
2 6-1
2 3-0
1-1
(1A)16 = (11010)2
5
October 10, 2024 Computing Fundamentals: Assignment 01
3.Convert the following into HEX numbers.
(a) (11101010)2
(b) (356)8
(c) (356)10
SOLUTION
(a) (11101010)2
Reason: To convert a binary number to hexadecimal, we group
the digits in sets of four
(11101010)2=(1110 1010)2
• 1110
= 1 x 23 + 1 x 22 + 1 x 21 + 0 x 20
= 14 = E16
• 1010
= 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20
= 10 = A16
(11101010)2 = (EA)16
(b) (356)8
6
October 10, 2024 Computing Fundamentals: Assignment 01
Reason: Each octal digit represents three binary digits. Convert
each digit to its 3-bit binary Number.
(356 )8 = 3 x 82 + 5 x 81 + 6 x 80
= 238 =(238)10
In BINARY;
(238)10 = (11101110)2
• 1110
= 1 x 2 3 + 1 x 2 2 + 1 x 21 + 0 x 2 0
= 14 = E16
(356)8 = (EE)16
c) (356)10
Reason: We Will Use Division Method by Dividing Number by 16
16 356
16 22-4
16 1-6
(356)10 = (164)16
4.Convert the following into OCTAL numbers.
(a) (11101010)2
(b) (234)10
(c) (ABC)16
SOLUTION
7
October 10, 2024 Computing Fundamentals: Assignment 01
(a) (11101010)2
Reason: To convert a binary number to octal, we will convert each
digit of the octal number into its corresponding 3-bit binary
representation.
(011 101 00)2
• 011
= 0 x 22 + 1 x 21 + 1 x 20
=3
• 101
= 1 x 22 + 0 x 21 + 1 x 20
=5
• 010
= 0 x 22 + 1 x 21 + 0 x 20
=2
(11101010)2 = (352)8
(b) (234)10
Reason: We Use Division Method by Dividing Number By 8.
8 234
8 29-2
3-5
8
October 10, 2024 Computing Fundamentals: Assignment 01
(234)10 = (352)8
(c) (ABC)16
Reason : We convert the hexadecimal number to binary. Each
hexadecimal digit converts to a 4-bit binary equivalent.
• A 10 1010(BINARY)
• B 11 1011(BINARY)
• C 12 1100(BINARY)
(ABC)16 = (1010 1011 1100)2
❖ Now Graphing Binary Number Into 3-bit Binary Representation.
(ABC)16 = (101 010 111 100)2
• 101
= 1 x 2 2 + 0 x 2 1 + 1 x 20
=5
• 010
= 0 x 2 2 + 1 x 2 1 + 0 x 20
=2
• 111
1 x 22 + 1 x 2 1 + 1 x 2 0
=7
• 100
= 1 x 2 2 + 0 x 2 1 + 0 x 20
=4
(ABC)16 = (5274)8