Hello World! An Invitation to Computer Science

Lecture Slides

Control and Memory Circuits
and the Von Neumann Architecture
Monday, March 3, 2008


Key ideas from last time


Control circuits


Conditional as Boolean expression

  if c then s else t

 c  s  t   out     product terms
-----------------------------------------------
 0  0  0    0
 0  0  1    1      (NOT c) AND (NOT s) AND t
 0  1  0    0
 0  1  1    1      (NOT c) AND s AND t
 1  0  0    0
 1  0  1    0
 1  1  0    1      c AND s AND (NOT t)
 1  1  1    1      c AND s AND t

  (c AND s) OR ((NOT c) AND t)

this is 1-bit multiplexor

this idea scales, as well


Binary → unary

decodertakes n-bit binary-coded input
  and turns on exactly one of 2n lines

 ins     outs
 a  b   c  d  e  f
 ----   ----------
 0  0   1  0  0	 0   c = (NOT a) AND (NOT b)
 0  1   0  1  0	 0   d = (NOT a) AND b
 1  0   0  0  1	 0   e = a AND (NOT b)
 1  1   0  0  0	 1   f = a AND b

Iterative operations


Strange loops


Toggle flip-flop

input     output
 t   old   new
 -------------
 0   0    0
 0   1    1
 1   0    1
 1   1    0

Just an XOR ... with feedback!


Abstraction hierarchy


von Neumann architecture


Memory


Input and output