bu_logic_01
bu_logic_01
1 2
3 4
5 6
7 8
Memory
• An information variable represented by physical
quantity.
• For digital systems, the variable takes on discrete
values.
Control • Two level, or binary values are the most prevalent
CPU unit Datapath values in digital systems.
• Binary values are represented abstractly by:
Inputs: – digits 0 and 1
Outputs: CRT,
Keyboard, – words (symbols) False (F) and True (T)
LCD, modem,
mouse, modem, Input/Output – words (symbols) Low (L) and High (H)
speakers – and words On and Off.
microphone
Synchronous or • Binary values are represented by values or ranges of
values of physical quantities
Asynchronous?
9 10
• What are other physical quantities • Positive radix, positional number systems
represent 0 and 1? • A number with radix r is represented by a
string of digits:
– CPU Voltage A n - 1A n - 2 … A 1A 0 . A - 1 A - 2 … A - m + 1 A - m
– Disk Magnetic Field Direction in which 0 ≤ Ai < r and . is the radix point.
– CD Surface Pits/Light • The string of digits represents the power series:
(∑ ) (∑ )
j=-1
– Dynamic RAM Electrical Charge i=n-1
(Number)r = Ai r i + Aj r j
i=0 j=-m
(Integer Portion) + (Fraction Portion)
13 14
Radix (Base) r 10 2
15 16
= (1001110001)2 →10, B→
A→ → 11, C→
→ 12, D→
→ 13, E→
→ 14, F→
→ 15
19 20
21 22
25 26
27 28
29 30
31 32
33 34
35 36
39 40
43 44
45 46
• Single Bit Addition with Carry Given two binary digits (X,Y), a carry in (Z) we get the
following sum (S) and carry (C):
• Multiple Bit Addition
Carry in (Z) of 0: Z 0 0 0 0
• Single Bit Subtraction with Borrow X 0 0 1 1
• Multiple Bit Subtraction +Y +0 +1 +0 +1
CS 00 01 01 10
• Multiplication
Carry in (Z) of 1: Z 1 1 1 1
• BCD Addition X 0 0 1 1
+Y +0 +1 +0 +1
CS 01 10 10 11
47 48
• Extending this to two multiple bit • Given two binary digits (X,Y), a borrow in (Z) we
examples: get the following difference (S) and borrow (B):
• Borrow in (Z) of 0: Z 0 0 0 0
Carries 00000 10110 0
X 0 0 1 1
Augend 01100 10110 -Y -0 -1 -0 -1
Addend +10001 +10111 BS 00 11 01 00
• Borrow in (Z) of 1: Z 1 1 1 1
Sum 11101 101101
• Note: The 0 is the default Carry-In to the X 0 0 1 1
least significant bit. -Y -0 -1 -0 -1
BS 11 10 00 11
49 50
• Extending this to two multiple bit examples: The binary multiplication table is simple:
Borrows 00000 0011 0 0 ∗0 = 0 | 1 ∗0 = 0 | 0 ∗1 = 0 | 1 ∗1 = 1
Minuend 10110 10110 Extending multiplication to multiple digits:
Subtrahend - 10010 - 10011 Multiplicand 1011
Difference 00100 00011 Multiplier x 101
Partial Products 1011
• Notes: The 0 is a Borrow-In to the least significant
0000 -
bit. If the Subtrahend > the Minuend, interchange
and append a – to the result. 1011 - -
Product 110111
51 52
59 60
+ and -
61 62
67 68
71 72
XOR XNOR
A B A⊕B A B (A⊕B)'
0 0 0 0 0 1
0 1 1 0 1 0
1 0 1 1 0 0
1 1 0 1 1 1
75