assign1b_soln

assign1b_soln -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Solutions
to
Assign
1
questions
4
and
8
 
 NOTE:
handwritten
numbers
are
incorrect.
 Question
4.
 a)
10000111
–
1011001
(135‐89
=
46)
 0101
1001
2’s
complement
‐>
1010
0111
 


1000
0111


 +
1010
0111

 1
0010
1110

(46)

‐
note
carry
out
so
value
is
positive
 
 b)
1011001 – 10000111 (89 – 135 = -46) 10000111 2’s complement -> 01111001 


0101
1001


 +
0111
1001
 



11010010
‐
note
no
carry
out
so
value
is
negative
an
din
2’s
complement
 
 11010010

2’s
complement
‐>

‐
00101110
(‐46)
 
 c)
0.1001
–
0.0101
(0.5625
–
0.3125
=
0.25)
 


 0.0101
2’s
complement
‐>
1.1011
 
 


0.1001


 +
1.1011
 

10.0100
(0.25)‐
carry
out
so
value
is
positive

 
 d)
.0101

‐
0.1001
(0.3125

‐
0.5625
=
‐0.25)
 
 0.1001
2’s
complement
‐>
1.0111
 
 


0.0101


 +
1.0111
 0
1.1100
–
no
carry
out
so
value
is
negative
 
 1.1100
2s
complement
‐>
‐0.0100
(‐0.25)
 
 
 
 
 
 
 
 
 
 
 Question
8.
3
input
NAND
gate
F
=
(ABC)’

;
cascade
of
two
NAND
gates
G
=
((AB)’C)’
 F
=
(ABC)’
=
A’
+
B’
+
C’

(deMorgans)
 G
=
((AB)’C)’
=
((A’
+
B’)C)’
=
(A’C
+
B’C)’
=
(A’C)’(B’C)’
=
(A
+
C’)(B+C’)

 



=
AB
+
AC’
+
BC’
+
C’
=
AB
+
AC’
+
C’
=
AB
+
C’
!=
F
 
 using
deMorgan’s,
distribution
and
identity
above
 
 Truth
table
just
to
confirm
 
 A
 B
 C
 (ABC)’
 (AB)’
 ((AB)’C)’
 0
 0
 0
 1
 1
 1
 0
 0
 1
 1
 1
 0
 0
 1
 0
 1
 1
 1
 0
 1
 1
 1
 1
 0
 1
 0
 0
 1
 1
 1
 1
 0
 1
 1
 1
 0
 1
 1
 0
 1
 0
 1
 1
 1
 1
 0
 0
 1
 
 
 ...
View Full Document

Ask a homework question - tutors are online