Arithmetic and Logic Calculator
Posted: Sat Sep 20, 2014 4:23 pm
Build an arithmetic and logic calculator that has:
1) Four input bits of data, stored in a single-bit register (D-type latch)
2) One carry-in bit, stored in a register (D-type latch)
3) Six instruction bits, each stored in a register (D-type latch).
a. The first and second bits of the instruction (B1 and B2) specify the
operation to be performed.
- 00 is a NOR operation
- 01 is a AND operation
- 10 is an NAND operation
- 11 is an ADD operation
b. The third and fourth bits of the instruction (B3 and B4) specify one
input data register which will be used in your calculation.
- Register 0 is addressed as 00
- Register 1 is addressed as 01
- Register 2 is addressed as 10
- Register 3 is addressed as 11.
c. The fifth and sixth bits of the instruction (B5 and B6) specify the
second input data register which will be used in your calculation.
- Register 0 is addressed as 00
- Register 1 is addressed as 01
- Register 2 is addressed as 10
- Register 3 is addressed as 11.
4) Each operator will perform a calculation on the input data from the registers
identified by bits B3, B4, B5 and B6.
5) ADD operations will also use the carry-in register.
6) If you perform a logical operation (NOR, AND or NAND), the output should
be stored in an output register (D-type latch).
7) If you perform an ADD, you should store the trailing bit in the output register,
and the leading bit in a carry-out register (D-type latch).
I have problems understand this problem i have to solve.
So i am to make a four single-bit register, but i don't know what i have to do for it.
I also have to make a six instruction bit, each stored in a register.
So how does B3 + B4 and B5 + B6 relate to the input bits ?
How am i supposed to make this curcuit
Thank you in advance.
1) Four input bits of data, stored in a single-bit register (D-type latch)
2) One carry-in bit, stored in a register (D-type latch)
3) Six instruction bits, each stored in a register (D-type latch).
a. The first and second bits of the instruction (B1 and B2) specify the
operation to be performed.
- 00 is a NOR operation
- 01 is a AND operation
- 10 is an NAND operation
- 11 is an ADD operation
b. The third and fourth bits of the instruction (B3 and B4) specify one
input data register which will be used in your calculation.
- Register 0 is addressed as 00
- Register 1 is addressed as 01
- Register 2 is addressed as 10
- Register 3 is addressed as 11.
c. The fifth and sixth bits of the instruction (B5 and B6) specify the
second input data register which will be used in your calculation.
- Register 0 is addressed as 00
- Register 1 is addressed as 01
- Register 2 is addressed as 10
- Register 3 is addressed as 11.
4) Each operator will perform a calculation on the input data from the registers
identified by bits B3, B4, B5 and B6.
5) ADD operations will also use the carry-in register.
6) If you perform a logical operation (NOR, AND or NAND), the output should
be stored in an output register (D-type latch).
7) If you perform an ADD, you should store the trailing bit in the output register,
and the leading bit in a carry-out register (D-type latch).
I have problems understand this problem i have to solve.
So i am to make a four single-bit register, but i don't know what i have to do for it.
I also have to make a six instruction bit, each stored in a register.
So how does B3 + B4 and B5 + B6 relate to the input bits ?
How am i supposed to make this curcuit
Thank you in advance.