Assignment 2 ICT
Assignment 2 ICT
UNIVERSITY OF WAH(UOW)
DEPARTMENT OF COMPUTER
SCIENCE
COURSE:
I C T GE.181
SUBMITTED TO:
Ma’am Saba Iqbal
SUBMITTED BY:
Abdullah Sajid
Class & Section
BS CS 1st B
De Department of Computer Science
UW Assignment#2
Q1: Convert the following given numbers into the given bases. (8)
i. (11011000111)2 = (?)8
Answer:
We are making groups of each three pairs from right to left:
011 = 0 x 22 + 1 x 21 + 1 x 20 = 0+2+1 = 3
011 = 0 x 22 + 1 x 21 + 1 x 20 = 0+2+1 = 3
000 = 0 x 22 + 0 x 21 + 0 x 20 = 0+0+0 = 0
111= 1 x 22 + 1 x 21 + 1 x 20 = 4+2+1 = 7
So, the conversion of
(11011000111)2 is equal to (3307)8
ii. (11110100011)2 = (?)16
Answer:
We are making groups of each four pairs from right to left:
0011 = 0 x 22 + 1 x 21 + 1 x 20 = 0+2+1 = 3
1010 = 1 x 23 + 0 x 22 + 1 x 21 + 0 x 20 = 8+0+2+0 = 10 = A
0111 = 0 x 23 +1 x 22 + 1 x 21 + 1 x 20 = 0+ 4+2+1 = 7
So, the conversion of
(11110100011)2 is equal to (3A7)16
1|Page
Q2: Convert the following given numbers into the given bases. (12)
2|Page
So, the conversion of
(756.102)8 is equal to (494.130254)10
iii. (1011.011)2 = (?)10
Answer:
We multiply each binary digit by its place value and add the products.
(1011.011)2 = (1 × 23) + (0 × 22) + (1 × 21) + (1 × 20) + (0 × 2-1) + (1 × 2-2) + (1 × 2-3)
1 1 1
= 1 x 8 + 0 + 2 + 1 + (1 x 2 ) + (1 x 4 ) + (1 x )
8
We multiply each digit by its place value and add the products.
= (3 × 16) + (3 × 4) + (2 × 1)
= 48 + 12 + 2
= (62)10
(62)10 = (142)6
3|Page