Question

4. Design a 4-bit Adder / Subtractor. Follow the steps given below. (a) Write the VHDL code for a 1-bit Full Adder. The VHDL

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a) VHDL code for 1 bit full adder:-

library ieee;
use ieee.std_logic_1164.all;

entity full_adder is port(a,b,c:in bit; sum,carry:out bit);
end full_adder;
  
architecture dataf of full_adder is
begin
sum<= a xor b xor c;
carry <= ((a and b) or (b and c) or (a and c));
end dataf;

b)

By A Az B, AO FULL ADOBR FULL ADDBA full ADDRD COROLL MODER sha cout Ha SS

If the value of K (Control line) is 1, th output of B0(xor)K=B0′(Complement B0). Thus the operation would be A+(B0′). Now 2’s complement subtraction for two numbers A and B is given by A+B’. This suggests that when K=1, the operation being performed on the four bit numbers is subtraction.

Similarly If the Value of K=0, B0 (xor) K=B0. The operation is A+B which is simple binary addition. This suggests that When K=0, the operation being performed on the four bit numbers is addition.

Then C0 is serially passed to the second full adder as one of it’s outputs.The sum/difference S0 is recorded as the least significant bit of the sum/difference. A1, A2, A3 are direct inputs to the second, third and fourth full adders.Then the third input is the B1, B2, B3 XORed with K to the second, third and fourth full adder respectively. The carry C1, C2 are serially passed to the successive full adder as one of the inputs. C3 becomes the total carry to the sum/difference. S1, S2, S3 are recorded to form the result with S0.

Add a comment
Know the answer?
Add Answer to:
4. Design a 4-bit Adder / Subtractor. Follow the steps given below. (a) Write the VHDL...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Tim Question 1 Atte 20 pts 2H 24 Design a 1-bit Full Adder using NOR gates...

    Tim Question 1 Atte 20 pts 2H 24 Design a 1-bit Full Adder using NOR gates only, you must include and show: Truth tables, detail logic gate circuit designs, and Boolean expressions Upload Choose a File 20 pts Question 2 Design a 4-bit Full Adder with inputs (Xo...X3, Yo...Y3) in which inputs X are connect to two 4-bit registers via four 2-to-1 Multiplexers and inputs Y are connected to two other 4-bit registers via four 2-to-1 Multiplexers. In this case...

  • Introduction: This experiment studies the design of an 8-bit adder/subtractor circuit using VHDL capture. The experiment...

    Introduction: This experiment studies the design of an 8-bit adder/subtractor circuit using VHDL capture. The experiment investigates the implementation of addition and subtraction operations with circuits. This lab uses the virtual simulation environment to validate the design practically in the FPGA board. Equipment: • This experiment requires Quartus Prime and the Intel's DE2-115 FPGA board. • All students should have the Intel QP and ModelSim-Intel-Starter-Edition softwares installed in personal computers. • VPN connection to UNB Network and remote desktop software...

  • Q. 2. (a) Using full adders and some other gates, design subtractor that subtracts an 8-bit...

    Q. 2. (a) Using full adders and some other gates, design subtractor that subtracts an 8-bit binary number (Y.... Yo] from 8-bit binary number [X, ... Xo). Write necessary equations. Draw detailed circuit diagram and explain steps. (b) Write Verilog code for the above subtractor.

  • (h) Using the following relationship: and the relationship determined in (h), design a 1-bit adde...

    (h) Using the following relationship: and the relationship determined in (h), design a 1-bit adder/subtractor circuit which has the following inputs: A, B, Sel and Cin/Bin D and outputs: S/D and Cout/Bout Where Sel is a selection line with the following properties Selection Operation 1 Subtractor Page 40 of 44 EEE2046F/EEE2050F Practical Manual 2019 (version 1.0) (Revision date: 2019-02-26) EEE2046F/EEE2050F Practical Manual Draw a full circuit diagram of the Boolean equation using 2-input logic gates and include it in your...

  • Using single bit Full Adder (FA) blocks (as shown below) and required gates, construct a 6-bit...

    Using single bit Full Adder (FA) blocks (as shown below) and required gates, construct a 6-bit Adder/Subtractor for signed numbers. Use the signed two’s complement system for the signed numbers. Verify your design for the following addition and subtraction by specifying A as A5A4A3A2A1A0 and B as B5B6B3B2B1B0, determining the inputs to the FAs and their outputs and showing that the outputs correspond to the correct results: a) A-B with A = -13, B = +20 (5 points) b) A+B...

  • 8/8pts Question 1 Using block diagram of 1-bit full adders create a 3-bit parallel adder (show...

    8/8pts Question 1 Using block diagram of 1-bit full adders create a 3-bit parallel adder (show all the connections between the adders and proper outputs Logic Q1jpg 4/9 pts Question 2 Consider your design, if the inputs to be added were 100, and 111, what will be the resulting sum output (Express the resulting sum in binary and base 8 using the least number of bits)? What will be the carry output (Express it only in binary using the least...

  • number 4 and 5 please! PROBLEM STATEMENT A logic circuit is needed to add multi-bit binary...

    number 4 and 5 please! PROBLEM STATEMENT A logic circuit is needed to add multi-bit binary numbers. A 2-level circuit that would add two four-bit numbers would have 9 inputs and five outputs. Although a 2-level SOP or POS circuit theoretically would be very fast, it has numerous drawbacks that make it impractical. The design would be very complex in terms of the number of logic gates. The number of inputs for each gate would challenge target technologies. Testing would...

  • DOING NUMBER 7 of VHDL lab "write your own full-adder in VHDL " is my only...

    DOING NUMBER 7 of VHDL lab "write your own full-adder in VHDL " is my only request. Do the rest, if you have time. To verify and apply techniques to build half adders and full adder to perform additions using gates. For each part of the procedure, show the number of that section and include a logic diagram of the circuit, truth table for the circuit, and any other necessary information. Adder Implementation 1. Construct a binary half-adder and record...

  • Design an 8-bit full adder using Verilog (Use only 1-bit full adders). Write the design code,...

    Design an 8-bit full adder using Verilog (Use only 1-bit full adders). Write the design code, test-bench code of it, and test your design with six inputs. Note: Only use Verilog to design 8-bit full adder.

  • 1. A 2-bit adder may be constructed by connection two full adders (i.e. 1-bit adders) or directly...

    Can you please show the work!plzz 1. A 2-bit adder may be constructed by connection two full adders (i.e. 1-bit adders) or directly. For the latter, suppose the inputs (corresponding to the operands A and B) are A, Ao, B1 and Bo; and the outputs are So and S, for the 2-bit sum, S, and a carry-out, C . Give a truth table for the "direct" adder » From the truth table, derive a logic expression in sum-of-products form Give...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT