0% found this document useful (0 votes)
38 views5 pages

Talent Acceleractor Assignment 1

computer science
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views5 pages

Talent Acceleractor Assignment 1

computer science
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Binary-decimal conversions

1. Decimal to Binary:
15927
a) 1592710 = =¿ 7963 remainder 1
2
15927
=3981 with remainder 1
2
3981
= 1990 with remainder 1
2
1990
=¿995 with remainder 0
2
995
= 497 with remainder 1
2
497
=¿ 248 with remainder 1
2
248
= 124 with remainder 0
2
124
=¿ 62 with remainder 0
2
62
=31with remainder 0
2
31
=15with remainder 1
2
15
= 7 with remainder 1
2
7
= 3 with remainder 1
2
3
=¿1 with remainder 1
2
1
=0with remainder 1
2
The binary number for 1592710 is 11111000110111

b) 4320/2 = 2160 with remainder 0

2160/2 = 1080 with remainder 0

1080/2 = 540 with remainder 0

540/2 = 270 with remainder 0


270/2 = 135 with remainder 0

135/2 = 67 with remainder 1

67/2 = 33 with remainder 1

33/2 = 16 with remainder 1

16/2 = 8 with remainder 0

8/2 = 4, remainder 0

4/2 = 2 with remainder 0

2/2 = 1 with remainder 0

1/2 = 0 with remainder 1

c) 68321 base 10
68321 / 2 = 34160 with remainder 1

34160 / 2 = 17080 with remainder 0

17080 / 2 = 8540 with remainder 0

8540 / 2 = 4270 with remainder 0

4270 / 2 = 2135 with remainder 0

2135 / 2 = 1067 with remainder 1

1067 / 2 = 533 with remainder 1

533 / 2 = 266 with remainder 1

266 / 2 = 133 with remainder 0

133 / 2 = 66 with remainder 1

66 / 2 = 33 with remainder 0

33 / 2 = 16 with remainder 1
16 / 2 = 8 with remainder 0

8 / 2 = 4 with remainder 0

4 / 2 = 2 with remainder 0

2 / 2 = 1 with remainder 0

1 / 2 = 0 with remainder 1

Therefore the binary number of 68321 is 10000101011100001


2.
a) 110011001 base 2
8 7 6 5 4 3 2 1 0
1 ×2 +1 ×2 +0 ×2 + 0× 2 +1× 2 +1 ×2 +0 ×2 +0 × 2 +1 × 2

1×256 +1× 128+0 ×64 +0 ×32+1 ×16+1 × 8+0 × 4+0 × 2+ 1× 1

=256+128+0+0+16+8+0+0+1
=409
Hence the decimal of binary number 110011001 is 409

b) 111100 base 2
1×25 +1 ×2 4 +1× 23+ 1× 22+0×21 +0 × 20
1×32+1 ×16+ 1× 8+0 × 4+0 × 2+0 ×1
32+16+8+4+0+0 =60
Therefore the decimal number of binary 111100 base 2 is 60

c) 11011011001 base 2
1×210 +1 ×29 +0 × 28+ 1× 27+ 1× 26+ 0 ×25 +1× 24 +1 ×23 +0 × 22+ 0× 21+ 1× 20
=1
×1024 +1× 512+0 ×256+ 1×128 +1× 64+0 × 32+ 1× 16+1 ×8+0 × 4+ 0 ×2+1 ×1
1024+512+0+128+64+0+16+8+0+0+1
=1753
Therefore the decimal number of binary 11011011001 is 1753

3. Binary-hex conversions
a) 1101
From the table 1101=D

b) 1010 from the table 1010=A


c) 1111 from the table 1111= F
d) 1001 0011 from the table 1001=9 and 0011=3 , therefore the hex decimal for 1001 0011
is 93.
e) 0110 0111 from the table 0110=5 and 0111=7, therefore hex decimal for 0110 0111 is 57
f) 1101 1000 from the table 1101=D and 1000=8 , therefore hex decimal for 1101 1000 is
D8
g) 0101 1100 from the table 0101=5 and 1100 =C , therefore the hex decimal for 0101 1100
is 5C
h) 1001 0010 1010 0110
From the table:
1001 = 9
0010=2
1010=A
0110=6
The hex decimal for 1001 0010 1010 0110 is 92A6
i) 1001.0011
From the table 1001=9 and 0011=3
Therefore the hex decimal is 9.3
j) 10.0011 from the table the hex decimal of 10=2 and hex decimal of 0011=3
Therefore the hex decimal of 10.0011=23

4. Convert each hex decimal to binary


a) 6F
(6) base 16 =(0110) base 2 from the table
(F) base 16 =(1111) base 2 from the table
Joining the values and removing zero from the left to get the binary result
Therefore the binary number of 6F is 1101111
b) CC
(C) base 16 = 1100 base 2
(C) BASE 16=1100 base 2
Joining the values and removing zero at left to get the binary number result’
Therefore the binary number of CC=11001100
c) 47A2
(4) base 16 = (0100) base 2
(7) base 16 = (0111) base 2
(A) base 16 = (1010) base 2
(2) base 16 =(0010) base 2
Joining the values and removing zero at left to get the binary result .
Then the binary number is 100011110100010
d) 5.F
(5) base 16 =(0101) base 2
(F) base 16 =(1111) base 2
Joining the values and removing zero at left to get the binary number.
Therefore the binary number of 5.F IS 101.1111
e) A4.E
(A) Base 16 = (1010) base 2
(4) base 16 =(0100) base 2
(E) base 16 = (1110) base 2
Joining the values and removing zero at left to get the binary number .
The binary number is 10100100.1110
f) 6D.7C
(6)base 16 =(0110) base 2
(D) base 16 =(1101) base 2
(7) base 16 =0111 base 2
(C) base 16 = 1100 base 2
Joining the values and removing zero at left to get the binary number .
The binary number is 1101101.01111100

You might also like