Question about NOR gates and overflow

  • Thread starter seang
  • Start date
In summary, To develop a minimal NOR circuit for detecting overflow, you must consider the sign bits of the two addends (A and B) and their sum (S). The length of the addends does not matter, as long as they are both of the same length. You can generalize the result to n bit addends by comparing the MSB of the two addends and designating one input as "the carry in". The overflow conditions can be determined by checking if the carry out equals 1 when adding the MSB of the two addends.
  • #1
seang
184
0
How do I develop a minimal NOR circuit that detects overflow by examining the sign bits of two addends (A and B) and their sum (S)?

Doesn't this depend on how long the addends A and B are? Is there anyway I can generalize the result to n bit addends?

or perhaps I can just designate one input as 'the carry in', compare the MSB of the two addends and go from there?
 
Physics news on Phys.org
  • #2
I believe the problem requires you to consider only the MSB of A and B, and the sum S of these bits. What are the overflow conditions given these 3 inputs? Work it out from there.
 
  • #3
seang said:
How do I develop a minimal NOR circuit that detects overflow by examining the sign bits of two addends (A and B) and their sum (S)?

Doesn't this depend on how long the addends A and B are? Is there anyway I can generalize the result to n bit addends?

or perhaps I can just designate one input as 'the carry in', compare the MSB of the two addends and go from there?

When adding, you MUST add two strings that are both of N bits. So, if you're adding strings of N bits, the sum of the carry out when adding the msb MUST NOT EQUAL 1.

If it equals 1, you have overflow.

For ex:

If you have two 8 bit strings...

1
10001
+11100
-------
01101

That 1 in the bold is a carry-out, hence overflow.
 

1. What is a NOR gate and how does it work?

A NOR gate is a digital logic gate that performs the logical NOR operation. It has two or more inputs and one output. The output of a NOR gate is only high (1) when all of its inputs are low (0). If any of the inputs are high, the output will be low. It works by using transistors to switch between high and low states based on the inputs.

2. How is a NOR gate different from an OR gate?

A NOR gate is the opposite of an OR gate. While an OR gate outputs a high signal if any of its inputs are high, a NOR gate only outputs a high signal if all of its inputs are low. Additionally, a NOR gate has a higher switching time compared to an OR gate, meaning it takes longer for the output to change in response to a change in inputs.

3. Can a NOR gate be used for arithmetic operations?

Yes, a NOR gate can be used for arithmetic operations, specifically for subtraction. By using a combination of NOR gates and other logic gates, subtraction can be performed in binary form. However, NOR gates themselves cannot perform all arithmetic operations and would require additional logic gates for more complex operations.

4. What is overflow and how is it related to NOR gates?

Overflow occurs when the result of an arithmetic operation is too large to be represented by the number of bits used. In other words, the result requires more bits than the system can handle. This can be related to NOR gates because if an arithmetic operation using NOR gates produces a result that is too large, it will result in an overflow.

5. Are there any practical applications of NOR gates?

Yes, NOR gates have many practical applications in digital circuits. They are commonly used in computer memory and central processing units (CPUs) to perform logic operations. They are also used in electronic clocks, calculators, and other digital devices. Additionally, NOR gates are used in the design of flip-flops and other sequential logic circuits.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
7
Views
6K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
4
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
9
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
5K
Back
Top