logo

Computer Architecture Study Material with Solved Assignments

   

Added on  2022-08-10

9 Pages1428 Words190 Views
Running head: COMPUTER ARCHITECTURE
COMPUTER ARCHITECTURE
Name of the Student
Name of the University
Author Note
Computer Architecture Study Material with Solved Assignments_1
COMPUTER ARCHITECTURE1
Question 1:
a)
In 2’s complement representation the MSB is the sign bit and the rest bits are used to
represent magnitude of the decimal number. Hence, when the number is 12 bit in 2’s
complement form then 11 bits are used to represent magnitude. Now, in unsigned form n bit
binary number can represent (2^n -1) integers from 1 to (2^n – 1). Thus for 12 bit signed 2’s
complement form 2* (2^11 – 1) numbers can be represented without 0. Hence, total of (2^12
– 1) decimal numbers can be represented in the range [-(2^n-1) to (2^n-1)] by a 12 bit 2’s
complement number.
b) X =15 F 016
Y =019 A16
Given, X and Y are 16 bit unsigned integers.
i) Hence, X = 0001 0101 1111 0000
Y = 0000 0001 1001 1010
ii) Now, NOT(X AND Y) = (XY)’ = X’ + Y’ (By De Morgan’s law)
X’ = (0001 0101 1111 0000)’ = 1110 1010 0000 1111
Y’ = (0000 0001 1001 1010)’ = 1111 1110 0110 0101
Now, X’ + Y’ = 1110 1010 0000 1111
+ 1111 1110 0110 0101
= 0001 1110 1000 0111 0100
Hence, NOT(X AND Y) = ( 0001 11101000 0111 0100 )2 = ( 1 E 874 ) 16
Computer Architecture Study Material with Solved Assignments_2
COMPUTER ARCHITECTURE2
iii) In this case X –Y is obtained by 1’s complement method.
First 1’s complement of Y = 1111 1110 0110 0101
Now, Y is added with X with binary addition technique.
0001 0101 1111 0000
+1111 1110 0110 0101
= 1 0001010001010101
Now, as the carry is 1 this carry is removed from the sum and added to the result to get the
result of subtraction.
1010001010101
+ 1
= 1 0100 0101 0110
Thus the result of subtraction in hexadecimal is ( 1456 )16.
The decimal equivalent of the result = 1*16^3 + 4*16^2 + 5*16 + 6*16^0 = 520610
iv) Now, when the computer registers are 16 bits wide then multiplication is performed in
step by step when Y is multiplied by 2 as given below.
1st step:
Y = 1 1001 1010
2 = 10
1 1001 1010*0 = 0 0000 0000
2nd step:
Computer Architecture Study Material with Solved Assignments_3

End of preview

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

Related Documents
IT Fundamental : Question and answer
|15
|1476
|54

bonus assignment.
|2
|448
|166

Module 5 S19 - Memory Management
|3
|699
|96

Frequency Modulation
|19
|1193
|110

Computer Organizations and Design - Solved Problems and Illustrations
|14
|1990
|116

Computer Science Assignment .
|17
|2507
|490