Beruflich Dokumente
Kultur Dokumente
Control unit
Input unit
Program
data
Instructio
n
Memory unit
Data
ALU unit
Progra
m
result
Output unit
Simplification of
computer system
Numbers convertion
anrn+an-1rn-1++a2r2+a1r+a0+a-1r-1+a-2r-2+a-mr-m
Coefficients aj range in value from 0 to r-1.
Base-5 number:
(4021.2)5
=4 X 53+0 X 52+2 X 51+1 X 50+2 X 5-1= (511.4)10
Others base-r number can be converted into
decimal
by this way.
3
Numbers conversion
Binary convert into decimal:
(110101)2=32+16+4+1=(53)10
The number behind equal sign obtained as
following table
Other operations
Remainder
1
0
0
1
0
Answer=101001
X
X
X
X
2
2
2
2
=
=
=
=
1
0
1
1
Fraction
+
+
+
+
0.3750
0.7500
0.5000
0.0000
Coefficient
a-1=1
a-2=0
a-3=1
a-4=1
1-5. Complements
Diminished radix
complement
shortcut(1<-->0)
0100111
11
Radix complement
complement
ed
unchang
ed
complemented
12
Subtraction with
complements
1.
2.
3.
Examples
Ex1-6: 3250 72532 using 10s complement
M = 03250
10s complement of N = + 27468
Sum= 30718 no end carry
The answer is (10s complement of 30718) = 69282
Examples
We can also use (r 1)s complement, the
sum is 1 less than the correct difference when
an end carry occurs. Removing the end carry
and adding 1 to the sum is referred to as an
end-around carry.
Ex1-8: Repeat Ex1-7 using 1s complement
(a)
X = 1010100
1s complement of Y = + 0111100
Sum = 10010000
End around carry = +
1
Answer : X Y = 0010001
15
Identic
al
MSB is 1 to
distinguish
them from
the
positive
numbers
17
Arithmetic of subtraction
and addition
2s complement:
1.
Have an end carry, discard then get answer
2.
No end carry, find 2s complement and add minus
sign front the answer
1s complement:
1.
Have an end around carry, add this bit then get
answer
2.
No end around carry, find 1s complement and add
minus sign front the answer
18
BCD Addition
1
1
0001 1000 0100
184
self-complementing
2421
0000
0001
0010
0011
0100
1011
1100
1101
1110
1111
0101
0110
0111
1000
1001
1010
Excess-3
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
0000
0001
0010
1101
1110
1111
8 4-2-1
0000
0111
0110
0101
0100
1011
1010
1001
1000
1111
0001
0010
0011
1100
1101
1110
22
Gray Code
(0 1 1 1)2
xor
(01 0 0)Gray
xor
(01 1 1)2
EX: from 7 to 8
Gray code changes from
0100 to 1100.
23
1.
2.
3.
ASCII Table
25
Control characters
26
ASCII A=1000001
ASCII T=1010100
SRFF
NOT1
AND2
S
R
Q
_
Q
AND3
Output
NOT2
Rd/We
Bit cell
28
Register
4bit Register
Select
Select
AND1
SRFF
NOT1
AND2
SRFF
Output
NOT1
NOT2
AND3
Output
Q
_
Q
S
R
Q
_
Q
Output
AND2
Q
_
Q
Output
AND3
Output
Q
_
Q
Select
AND2
AND1
S
R
Q
_
Q
Input
AND3
Output
SRFF
NOT1
AND2
S
R
NOT2
Rd/We
NOT2
SRFF
NOT1
AND2
Rd/We
Input
AND3
NOT2
Rd/We
SRFF
NOT1
AND1
NOT2
Output
NOT2
SRFF
NOT1
AND3
Q
_
Q
Select
Input
AND3
Input
Rd/We
AND1
SRFF
AND2
AND2
S
R
Select
Input
AND1
SRFF
NOT1
NOT2
AND1
Rd/We
AND2
Input
Rd/We
Select
NOT1
S
R
Rd/We
Select
AND1
Input
AND3
Q
_
Q
Decoder1X
2
Select
AND1
Input
Q
_
Q
AND3
Output
NOT2
Rd/We
Read/Write
29
Register Transfer
J
Clea
r
30
Binary information
processing
Operand
2
Operand
1
010010001
1
Sum
000100001
0
010010001
1
001110000
1
31
1.
2.
3.
32
1 + 1 = 12
33
Logic Gates
For each
combination of
the values of x
and y, and output
z, it may be listed
in a compact form
using truth tables.
34
36
Timing diagrams
37
38