This is a part of a project to construct a 4 BIT CPU from scratch. I will be starting with a simple NOR gate and building it up to a working model with ALU registers, RAM and ROM. I will be designing an op code and assembler to go with it. Progress and detail can be found on my blog here
This file cotains 4 bit versions of basic logic gates.
4 Bit Comparator circuit
A - A3 A2 A1 A0 B - B3 B2 B1 B0
A = B when, A3=B3,A2=B2,A1=B1,A0=B0.
A>B when, A3>B3 OR A3=B3 AND A2>B2 OR A3=B3 A2=B2 AND A1>B1 OR A3=B3 A2=B2 A1=B1 AND A0>B0.
A<B when, A3<B3 OR A3=B3 AND A2<B2 OR A3=B3 A2=B2 AND A1<B1 OR A3=B3 A2=B2 A1=B1 AND A0<B0.
This is My 4 Bit computer with 6 instructions just like the SAP Computer. :)
This computer cannot calculate more than 2 numbers
This Example Program shows 5+7 and 4-5.
To Program, Set the Reset Bit to 1 and Program the ROM.
To Run the Program, Set the Reset Bit to 0.
The Numbers in the output are in Two's Complement so if the number is more than 7
than the number will be negative because 7 is the biggest number in 4 bits.
My first project on this site!
this 4 bit adder is fully decimal, that means the number you input is decimal and the answer will also be in decimal.
The circuit consists of a decimal-to-binary converter, an 4 bit adder and a binary-to-decimal converter.
The circuit is made without sub-circuits.
To use the adder, click any number you want on the left and right side of the plus. The answer will appear on the right side, in decimal and binary.
The 4-bit adder which can do math on 4-bit integers and display on 2 7-segment LEDs.
This project is owned by Lu Xuan Minh - student of HCMUT.
Everyone can fork my project for the purpose of studying and researching.
Thank you for your viewing!
Lu Xuan Minh
Email: [email protected]