20
votes
Accepted
How should I understand FPGA architecture?
The green boxes are IO pins, the blue lines are wires, the red boxes are configuration bits, and the grey boxes are logic blocks. The red boxes can supply a constant logic 0 or logic 1 to whatever ...
19
votes
Accepted
check if an unsigned binary number is divisible by 15
Do you know how to check for divisibility by 9 in base 10?
Add all the digits using base 10 arithmetic. If the result has multiple digits, repeat the process. Stop when you have one digit. If the ...
16
votes
Accepted
I am unable to figure out how the answer to following question is 70ns
You have to check the longest path through the design. In this case it involves the carry, because that goes through all the adders.
The question isn't clear whether the output that is considered in ...
12
votes
Which gate is better in building the Full Adder ? XOR or OR
If I were doing a silicon implementation, I would use an XOR because of the symmetric properties. Symmetric circuits use much less power because the stack size is the same that does a few useful ...
8
votes
Is it important to add a transistor for the output of a 4 bit adder
What you are really asking is whether you can drive a LED directly from a digital signal, or whether it should be buffered by a transistor. Think about it. This has nothing to do with a adder or ...
8
votes
How should I understand FPGA architecture?
You posted your own explanation. Take a closer look at your own image:
The red box is meant as a label box for you to write into with a value or signal, and represents the signal that controls the ...
7
votes
How can I add three AC signals?
Use an op-amp mixer circuit. This will add three signals into one: -
Alternatively, if you did the math you would find that three independent voltage sources connected together thru 3 resistors of ...
7
votes
Accepted
Building a full adder with NPN BJT transistors
It's probably most straight forward using a NOR form as the basis of a BJT adder. It's quite simple to form the basic gate, this way. Nothing crazy, at all. Just simplicity.
The following schematic ...
6
votes
Accepted
Binary Adder and Parallel Adder
There is a distinction between parallel adder vs serial adder. Both are binary adders, of course, since are used on bit-represented numbers. Parallel adder is a combinatorial circuit (not clocked, ...
6
votes
Accepted
What is the purpose of a "carry in"?
It's important to understand there's a difference between a half-adder and a full-adder.
A half-adder is the simplest. It has 2 inputs and 2 outputs. It's basically a XOR.
The primary output is only ...
6
votes
Accepted
How much voltage does a green LED need to be supplied? Will it handle 5V?
Some logic chips have definite current limits built into their output structure, but many do not.
Depending on the logic chips being used you may well be able to direct connect the LEDs from output ...
6
votes
Accepted
Why does a full adder need an OR gate?
You're making a couple of assumptions:
Multiple outputs can be connected directly together
When any such output is "high", then the wire is "high".
This is known as "wired-OR", and indeed, such ...
6
votes
Efficiently calculate \$-x-y\$ using a single adder
Premature optimization is the root of all evil.
--Donald Knuth
If you want to do it efficiently, let the synthesis tools choose the best implementation. Just use an HDL to describe the behavior you ...
6
votes
VHDL: difference between using "+" or writing our own adder
Both have their uses: The second gives potentially better hardware in a real-life scenario, the first can be given to students as coursework for a course named "history of hardware" or something ...
5
votes
Accepted
What would be the output of A = 0100 and B = 0111 with S = 1 in a 4-bit binary adder-subtractor?
The blocks labeled "FA" are called full adders, and they are fundamental to how binary arithmetic is done at the gate level. The circuit you have presented here is an implementation of a 4-bit adder/...
5
votes
Accepted
Why is a half adder implemented with XOR gates instead of OR gates?
0 + 0 = 0 0
0 + 1 = 0 1
1 + 0 = 0 1
1 + 1 = 1 0
The ones place of a single-bit addition is equivalent to the exclusive OR operation, not the OR operation. Hence ...
5
votes
What is the purpose of a "carry in"?
Besides what is said by those who replied earlier, Carry can also mean an input coming from the flag register that allows linking one sum on a ALU to the next one. By linking I mean that, if your ...
5
votes
How should I understand FPGA architecture?
The green lines are wires, the red boxes are connections, you can connect a green wire to a block with a switch. The switch is in the red block and it can connect two wires together if enabled.
This ...
5
votes
Current adder or voltage adder
Neither, if the inputs come from voltage sources. The voltage at resistor output would equal to whichever of the two input voltages is higher, minus the voltage drop of the diode. Of course, if the ...
5
votes
Simplify the boolean function $$Z=A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i}$$
Observe that
\begin{align}\overline{\overline{A} \cdot\overline{B} + A\cdot B} = \overline{(\overline{A}\cdot\overline{B})}\cdot\overline{(A \cdot B)} = (A + B)\cdot(\overline{A}+\overline{B}) =
A \...
4
votes
What is the purpose of a "carry in"?
The purpose of the "carry" in is to accept the "carry" out of the previous adder. Carry works just like normal arithmetic.
Community wiki
4
votes
VHDL - Cheapest-Fastest unsigned to signed binary number converter
It really isn't worth worrying too much about this detail. Adding 1 to a number is such a common idiom in HDL that synthesis tools have highly-evolved methods for dealing wtih it. Also, most modern ...
4
votes
Accepted
calculate clock cycle of ripple Carry and lookahead adder
Ripple carry and carry lookahead adders are combinatorial circuits - they do not hold state and they are not clocked. So counting clock cycles is meaningless, unless perhaps you are talking about ...
4
votes
check if an unsigned binary number is divisible by 15
The technique is similar to what you would do to check if a number is divisible by 9 in decimal. We need split the number into four bit digits and then add the digits together repeatedly until we have ...
4
votes
What does "2 digit BCD number" mean?
The idea here is that you can treat a BCD digit as a single entity. Look at the components you have:
1-digit adder
Multiplexer (presumably for BCD digits)
9's complement unit
All of these use full ...
4
votes
Accepted
Simplify the boolean function $$Z=A\bar B \bar{C_i} + \bar A B \bar{C_i} + \bar A\bar B {C_i} + A B {C_i}$$
When in doubt about booleans, just build a truth table.
Truth tables for XOR (\$\oplus\$):
| 0 | 1
---+---+---
0 | 0 | 1
---+---+---
1 | 1 | 0
For "is ...
4
votes
How do I create a 1-bit full adder that outputs a 2-bit sum?
So I looked up what constitutes a full adder and found its truth table.
Taken from wikipedia:
So you can see that if the adder has the correct output, your sum and carry bits are simply the 2 bit ...
3
votes
Which 4-bit Binary Number Is Greater?
Actually in some applications your lookup table idea would be how it's done. It uses a fair amount of read-only memory to accomplish the task, but has the advantage of all solutions being found ...
3
votes
Accepted
Which 4-bit Binary Number Is Greater?
If you want to find the largest number between two unsigned numbers A and B, all you need to look at is the most significant bit where the bits in A and B are not the same, the larger number is the ...
3
votes
Design of a basic half-adder
For a half adder with inputs A and B
SUM = A XOR B
CARRY = A AND B
(from All About Circuits)
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
adder × 253digital-logic × 82
logic-gates × 37
vhdl × 28
carry-look-ahead × 23
binary × 18
circuit-design × 17
verilog × 15
fpga × 13
alu × 12
boolean-algebra × 11
multiplier × 10
flipflop × 9
integrated-circuit × 8
computer-architecture × 8
multiplexer × 7
delay × 7
propagation × 6
transistors × 5
clock × 5
summing × 5
voltage × 4
operational-amplifier × 4
circuit-analysis × 4
signal × 4