Posts

Making an Adder

The XOR gate is essentially a one bit adder, with an input of two 0's the output is 0                0+0 with an input of a 1 and a 0 the output is 1          1+0 with an input of two 1's the output is 0                1+1 = 10, requires carry out to expand the adder and add more bits, carrying out and carrying in is necessary the obvious approach to this is through one of the simplest gates: the AND gate. Using an AND gate attached to the same inputs being used by the XOR will output a 1 if and only if both inputs are on, ex if only one input or no input is on the and won't allow flow but if both inputs are on (which means rounding will be necessary) then it will output a 1 which would represent the 1 in two (10). Using the carryout is much more difficult than just getting it. To use it one approach is to take the inputs from the second digit of the numbers being added and...

Logic Gates

Image
Basic  truth tables from wikipedia And Gate: output is one only when both inputs are one Or Gate: output is one when either 1 or both inputs are 1 Inverted Nand Gate: output is one unless both inputs are one   Nor Gate: output is only 1 when no inputs are 1 Combined Xor Gate: output is one when only one input is one ---- used for addition

Arithmetic Logic Unit (ALU)

Image
Arithmetic logic unit Mathematical operation Add sub compare increment 2 inputs (example) CU gets instruction from ram Tells alu operation Adds inputs Outputs -> Register (like ram but nearby) The register won't save until the CU turns on the set wire When the set wire turns on it sets the  register = to the current output Enable wire from CU to register, makes register output what ever is saved -> connects to CPU Bus CPU Bus connects components inside cpu has more registers with set and enable, CU turns on set for whatever register it wants to save the output to CU then turns off enable wire to clear register of ALU Some registers for just storing info nearby CU ALU uses temporary register for input doesnt need enable because it only outputs ot ALU Other input from cpu bus directly stays on bus until ALU is done CU stores instruction in instruction register only outputs to CU Flags turn on or off based on conditions Flag register 1 inp...

Purpose

To construct a working computer with a basic CPU, memory, input, and output CPU - using integrated circuits - Includes ALU for computations - main function CU - control operations sent to ALU from ram/memory ALU - 4 or 8 bit computations - Add, subtract, increment, decrement - maybe carry in? Memory - basic ram module - non-volatile memory for any software that is necessary Input - switch board? maybe keypad Output - screen - maybe need make some basic program to process inputs