CS302 Assignment 1 Solution Fall 2018

CS302 Assignment
Question no. 1:
Perform the Following Operations with complete steps.
1. (725157)0+ (F12ADE) H — (101101010101011111001110101)2 — (9925)0
 Answer.
(725157)0
Covert this octal numb into decimal number
 (725157)0 = 7 x 85+2 x 84+5 x 83+1 x 82+5 x 81+7 x 80

(725157)0 =229376+8192+2560+64+40+7
(725157)0 = (240238) D

(F12ADE)H
Convert this hex number into decimal number
(F12ADE)H=F x 165+1 x 164+2 x 163+A x 162+D x 161+E x 16°
(F12ADE)H= (15) x 1048576+1 x 65536+2 x 4096+ (10) x 256+ (13) x 164(14) x 1
(F12ADE)H =15728640+65536+8192+2560+208+14
 (F12ADE)H= (15805150) D

(101101010101011111001110101)2
Convert binary into decimal number

First we converting it into Octal Number System.
= (552537165)0
Now converting it into Decimal Numbers System.
(552537165)0 = 5 x 88+5 x 87+2 x 86+5 x 85+3 x 84+7 x 83+1 x 82+6 x 81+5 x 8°
(552537165)0 = 83886080+10485760+524288+163840+12288+3584+64+48+5 (552537165)0= (95075957) D
Now add all these four values
= (240239) D-(15805150) D-(95075957) D-(9925) D
=-(79040493) D Answer

Question no. 2:
Step l: Convert the Hexadecimal number to binary by replacing the each hexadecimal symbol with appropriate four bits binary number. So we get.

Hexadecimal
E
A
C
1
2
9
number Binary
1110
1010
1100
0001
0010
1001


 Step 2: Now convert the each binary number to gray code by the grayest digit is sane as the left most binary digit and then add the adjacent pair of binary digits to find the next gray code.

number Binary
1110
1010
1100
0001
0010
1001

Gray Code
1001
1111
1010
0001
0011
1101



 FOR FULL QUESTION DOWNLOAD THIS FILE

Post a Comment

Don't Forget To Join My FB Group VU Vicky
THANK YOU :)

Previous Post Next Post