logo

Computer Architecture and Organization

   

Added on  2023-01-19

10 Pages1927 Words99 Views
 | 
 | 
 | 
Running head: COMPUTER ARCHITECTURE AND ORGANIZATION
Computer Architecture and Organization
Name of Student-
Name of University-
Author’s Note-
Computer Architecture and Organization_1

1COMPUTER ARCHITECTURE AND ORGANIZATION
Question 1:
a) (152)b = 0x6A
Step 1: (0x6A)16 = 6 * 161 + 10 * 160 = 96 + 10 = 106 which is not equal to the given
question
Step 2: (0x6A)16 = (01 101 010)2 = (152)8
So the value of b = 8
Step 1: In the first step, the hexadecimal number is converted to decimal number which
does not give the and as provided in the question.
Step 2: In step 2, the hexadecimal number is converted to binary number and taking three
digits from right side it gives the octal number of the hexadecimal number. So the base of the
given question is 8.
b) Conversions
i)0xBAD into 3-base representation
Step 1: (BAD)16 = B * 162 + A * 161 + D * 160 = (2989)10
Step 2: (2989)10 = 2989 mod 3 = 1
996 mod 3 = 0
332 mod 3 = 2
110 mod 3 = 2
36 mod 3 = 0
Computer Architecture and Organization_2

2COMPUTER ARCHITECTURE AND ORGANIZATION
12 mod 3 = 0
4 mod 3 = 1
1 mod 3 = 1
So, (BAD)16 = (11002201)3
Step 1: In first step, the hexadecimal number is converted to decimal number by
multiplying 160 at units place, 161 at tenth’s place and so on.
Step 2: In step 2, the decimal number is then converted to base 3 by performing modulus
with 3, and the get the result in bottom up approach.
ii) (321)7 into 2-base (binary) representation
Step 1: (321)7 = 3 * 72 + 2 * 71 + 1 * 70 = (162)10
Step 2: (162)10 = 162 mod 2 = 0
81 mod 2 = 1
40 mod 2 = 0
20 mod 2 = 0
10 mod 2 = 0
5 mod 2 = 1
2 mod 2 = 0
1 mod 2 = 1
So, (321)7 = (10100010)2
Computer Architecture and Organization_3

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents