0% found this document useful (0 votes)
27 views6 pages

Assignment Answers

Computer Architecture

Uploaded by

Hagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views6 pages

Assignment Answers

Computer Architecture

Uploaded by

Hagi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 6

Q1:

A. Represent the following two’s complement values in decimal: 


Answer: 1101011= - (25+23+21+20)= - 43
0101101= +(25+23+22+20)= 45

B. Convert the followings:


a. 0xAC12 to binary (0x means hexadecimal. So the number is AC12, and you should
ignore 0x)
Answer: (AC12)16= (1010110000010010 )2
A=10=1010 , C=12=1100 , 1=0001 ,2 =0010

b. −10710 to 8-bit 2’s Complement


Answer:
- 64 32 16 8 4 2 1

1 1 1 0 1 0 1 1
signed magnitude:

1’s complement: 1 0 0 1 0 1 0 0

2’s complement: 1 0 0 1 0 1 0 1

c. 10011110 (8-bit 2’s complement representation) to decimal


Answer: 10011110= - (24+23+22+21)= -30

d. 11010110102 into hexadecimal
Answer: (0011 0101 1010)2 =(35A)16
3 5 10=A
e. 1108 into hexadecimal
Answer:
Solution 1: convert Octal to Binary Solution 2: convert Octal to Decimal
(110)8=(001001000)2 (110)8=(72)10
convert Binary to Hexadecimal convert Decimal to Hexadecimal
(0000 0100 1000)2=(48)16 (72)10= (48)16
Q2.
Solution:
1/16=0.0625
convert Decimal to Binary ,(0.0625)10=(0.0001)2
normalization , (0.1)*2 -3
-3+127=124=1111100
apply IEEE-754

0 0 1 1 1 1 1 0 0 1 0 0 0 0 …………………….. 0

1bit 8 bits 23 bits

sign Biased Exponent Fraction

Q3.
   Solution:
The truth table is
I/P O/P
x y z F
0 0 0 0
0 0 1 0
0 1 0 0
0 1 1 1
1 0 0 0
1 0 1 1
1 1 0 0
1 1 1 1

Simplification to F:
F=x’yz+xy’z+xyz
=(x+x’)yz+xy’z
=yz+xy’z
Q4.
Solution:
J1=A’ XOR(XB) , K1=A’ XOR( X AND B)
J2=(X AND B)’ , K2=B’ XOR (X’OR A’)

Past State Q(t) State Logic(J1-K1&J2-K2) Next


StateQ(t+1)
Q1 Q1’ Q2 Q2’ J1=A’ K1=A’ J2= K2=B’ Q1 Q2
X X’ XB X’+A’
XOR XB XOR XOR(X’
(XB)’
(X B) +A’)

A A’ B B’ J1 K1 J2 K2 A B

0 1 0 1 0 1 0 1 1 1 1 0 1 1

0 1 0 1 1 0 0 1 1 1 1 0 1 1

0 1 1 0 0 1 0 1 1 1 1 1 1 1

0 1 1 0 1 0 1 1 0 0 0 1 0 0

1 0 0 1 0 1 0 1 0 0 1 0 1 1

1 0 0 1 1 0 0 0 0 0 1 1 1 0

1 0 1 0 0 1 0 1 0 0 1 1 1 0

1 0 1 0 1 0 1 0 1 1 0 0 0 1
Q5:
Solution:
on/off switchs: a , b
micro-switchs: c , d
emergency stop buttons: e , f
machine run/stop: y
“1” refers to on/run
“0”refers to off/stop

Number of input(n)=6,number of combination states=2n=26=64

a b c d e f y
0 0 0 0 0 0 0
0 0 0 0 0 1 0
0 0 0 0 1 0 0
0 0 0 0 1 1 0
0 0 0 1 0 0 0
0 0 0 1 0 1 0
0 0 0 1 1 0 0
0 0 0 1 1 1 0
0 0 1 0 0 0 0
0 0 1 0 0 1 0
0 0 1 0 1 0 0
0 0 1 0 1 1 0
0 0 1 1 0 0 0
0 0 1 1 0 1 0
0 0 1 1 1 0 0
0 0 1 1 1 1 0
0 1 0 0 0 0 0
0 1 0 0 0 1 0
0 1 0 0 1 0 0
0 1 0 0 1 1 0
0 1 0 1 0 0 0
0 1 0 1 0 1 0
0 1 0 1 1 0 0
0 1 0 1 1 1 0
0 1 1 0 0 0 0
0 1 1 0 0 1 0
0 1 1 0 1 0 0
0 1 1 0 1 1 0
0 1 1 1 0 0 1
0 1 1 1 0 1 0
0 1 1 1 1 0 0
0 1 1 1 1 1 0
1 0 0 0 0 0 0
1 0 0 0 0 1 0
1 0 0 0 1 0 0
1 0 0 0 1 1 0
1 0 0 1 0 0 0
1 0 0 1 0 1 0
1 0 0 1 1 0 0
1 0 0 1 1 1 0
1 0 1 0 0 0 0
1 0 1 0 0 1 0
1 0 1 0 1 0 0
1 0 1 0 1 1 0
1 0 1 1 0 0 1
1 0 1 1 0 1 0
1 0 1 1 1 0 0
1 0 1 1 1 1 0
1 1 0 0 0 0 0
1 1 0 0 0 1 0
1 1 0 0 1 0 0
1 1 0 0 1 1 0
1 1 0 1 0 0 0
1 1 0 1 0 1 0
1 1 0 1 1 0 0
1 1 0 1 1 1 0
1 1 1 0 0 0 1
1 1 1 0 0 1 0
1 1 1 0 1 0 0
1 1 1 0 1 1 0
1 1 1 1 0 0 1
1 1 1 1 0 1 0
1 1 1 1 1 0 0
1 1 1 1 1 1 0

y=a’bcde’f’+ab’cde’f’+abcde’f’
= bcde’f’(a’+a) + ab’cde’f’
= bcde’f’ + ab’cde’f’
= cde’f’(b+ab’)
= cde’f’(b(1+a)+ab’)
= cde’f’(b+ab+ab’)
= cde’f’(b+a(b+b’))
= cde’f’(b+a)
Q6. Using basic Boolean algebra identities, prove that  ABC+ABC'+AB'C+A'BC = AB
+ AC + BC. Please show all steps and mention the identities used.

 Answer:

The identities used:X+X=X , so ABC+ABC=ABC

ABC+ ABC' + AB'C + A'BC

=ABC+ABC+ABC’+AB’C+A’BC

 = AB(C+C’)+ABC+AB’C+A’BC

= AB(C+C’)+ABC+ABC+AB’C+A’BC

=AB+ AC(B+B’)+ BC(A+A’)

=AB+AC+BC

You might also like