# CS302 Assignment 1 Solution Spring 2018

Perform the following operations with complete steps and provide the answers in required number system. You can only use Repeated division method for base conversions. You are required to show all steps involved in calculations and conversions.

Q 1: (F2BA3F)16-(10110101000000011110001)2+(737475217)8=(__________________)16

Solution:

I am taking Left Hand Side and convert Hexadecimal, Binary and Octal Values into a Decimal Value.

= (F2BA3F)16-(10110101000000011110001)2+(737475217)8

={(F*165)+(2*164)+(B*163)+(A*162)+(3*161)+(F*160)}-{(1*222)+(0*221)+(1*220)+(1*219)+(0*218)+(1*217)+(0*216)+(1*215)+(0*214)+(0*213)+(0*212)+(0*211)+(0*210)+(0*29)+(0*28)+(1*27)+(1*26)+(1*25)+(1*24)+(0*23)+(0*22)+(0*21)+(1*20)}+{(7*88)+(3*87)+(7*86)+(4*85)+(7*84)+(5*83)+(2*82)+(1*81)+(7*80)}

As we know that F=15, B=11 and A=10 in Hexadecimal System So,

={(15*165)+(2*164)+(11*163)+(10*162)+(3*161)+(15*160)}-(4194304+0+1048576+524288+0+131072+0+32768+0+0+0+0+0+0+0+128+64+32+16+0+0+0+1)+(117440512+6291456+1835008+131072+28672+2560+128+8+7)

= (15728640+131072+45056+2560+15)-5931249+125729423

= 15907343-5931249+125729423

=135705517

= (135705517)10 are in Decimal Number System.

Now we’ll convert this Decimal Number into Hexadecimal Number System by Repeated Division method by 16 so,

 16 135705517 16 8481594 13=D 16 530099 10=A 16 33131 3 16 2070 11=B 16 129 6 8 1

It is clear that