comp logic 2


		 +Ve

		  |
		  |
		  \	
		  /
		  \
		  /
		  |
		  +---------- out
  		  |
	      +---+---+
	      |       |
     in ------|       |
	      |       |
	      +---+---+
	 	  |
		  |
		  |
		 -ve



Logic levels

(input, output)


	H	high

	TTL	tied to low




left 	input

right 	output

below 	-ve, unless otherwise specified

above, 	+ve, thr. a resistor, unless otherwise specified





2.


Or
	
	---- X ----+
		   |
		   |
	---- X ----+---- X ----





And


	---- X ---- X ----+
		          |
    		          |
	---- X ---- X ----+---- X ----




Not

	---- X ----



3.

basic combination


	---- X ----+
		   |
		   +----
		   |
	---- X ----+
	           :
                   :
                   :




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


	not or




4.

others


left shift


in			out
	--  +----- R
	    |
	----+
		
            +----- R
	    |
	----+   -- R





detect zero

	---- X ----+
		   +------
	---- X ----+
		   |
	---- X ----+
		   |
	---- X ----+




detect negative number

(two's complement)


	---- X ----




5.

Functions


	and
	or
	not
	xor

	left shift
	right shift

	load register from memory
	store to memory
	transfer R1 to R2

	jump on zero
	jump on not zero
	jump on less than zero
	jump on less than or equal to zero
	jump on gt than zero
	jump on gt than or equal to zero





registers R1, R2


operation 'and', R1 and R2 -> R1





