Detector of even numbers in logic circuit

In summary, the conversation discusses the creation of a circuit that detects even numbers using binary representation and the use of Karnaugh maps to simplify the equation. The equation for F is determined to be F = /B0 * /A0, where B0 and A0 represent the least significant bit of input B and A respectively. The conversation also briefly touches on the propagation delay of various logic gates and the maximum period required for the circuit.
  • #1
Max0007
66
1

Homework Statement


I need to make a circuit that detects even numbers.
Need to find the equation for F when input A and B are both even.

Input A: Word of 5 -bit signed representation in complement 2.
Input B: Word of 3 -bit signed representation in complement 2.

Homework Equations


for B:
000 = 0 (even)
001 = 1
010 = 2 (even)
011 = 3
100 = -4 (even)
101 = -3
110 = -2 (even)
111 = -1

For A:
same as B but with 5 bits.

00000 = 0 (even)
00001 = 1
00010 = 2 (even)
00011 = 3
00100 = 4 (even)
00101 = 5
00110 = 6 (even)
00111 = 7
...
...
11111 = -1

The Attempt at a Solution



I am just wanting to know the steps on how I start this.

Do I do Karnaugh for both inputs then join both equation together?
 
Physics news on Phys.org
  • #2
What feature of a number represented in binary (either unsigned or 2's complement) allows you to tell that it is odd or even? Don't need to convert it to decimal... There is something all even binary numbers have in common that allows you identify them as even.
 
  • #3
lewando said:
What feature of a number represented in binary (either unsigned or 2's complement) allows you to tell that it is odd or even? Don't need to convert it to decimal... There is something all even binary numbers have in common that allows you identify them as even.
I realized that binary ending with a 0 = even and binary ending with 1 = odd.

So basically its F = /A/B ??
 
  • #4
You are not interested in all of the binary digits of A or B. Just the least significant binary digit.
 
  • Like
Likes Max0007
  • #5
lewando said:
You are not interested in all of the binary digits of A or B. Just the least significant binary digit.
How do I make my logic circuit to check only the least significant binary digit?
 
  • #6
Max0007 said:
How do I make my logic circuit to check only the least significant binary digit?
if input B least significant bit = 0 then its an even number.
if input A least significant bit = 0 then its an even number.

If A and B = 0 then its an even number and F = 1

but how do I actually write this in an equation with gates?
 
  • #7
Max0007 said:
if input B least significant bit = 0 then its an even number.
if input A least significant bit = 0 then its an even number.

If A and B = 0 then its an even number and F = 1

but how do I actually write this in an equation with gates?
Why do you have "If A and B = 0 then its an even number and F = 1" as a separate condition?

Why do you have the first two statements as independant statements? They are NOT true taken as stand-alone statements.

How do you combine all 3 statements into one statement?
 
  • Like
Likes Max0007
  • #8
phinds said:
Why do you have "If A and B = 0 then its an even number and F = 1" as a separate condition?

Why do you have the first two statements as independant statements? They are NOT true taken as stand-alone statements.

How do you combine all 3 statements into one statement?
Sorry my english is not my primary language I did not meant to split it up in 2 condition, just that when A and B = 0 then the output is 1.
 
  • #9
phinds said:
Why do you have "If A and B = 0 then its an even number and F = 1" as a separate condition?

Why do you have the first two statements as independant statements? They are NOT true taken as stand-alone statements.

How do you combine all 3 statements into one statement?
Here are my Kmap for input A and B.
 

Attachments

  • kmap1.jpg
    kmap1.jpg
    37.3 KB · Views: 780
  • kmap2.jpg
    kmap2.jpg
    33.6 KB · Views: 762
  • #10
You had it right in your statements and now you are complicating it. Why?
 
  • #11
Max0007 said:
How do I make my logic circuit to check only the least significant binary digit?

Maybe this is the root of the problem. When you have to draw an actual circuit, how will you represent a 5-bit binary number? A 3-bit binary number? What will you draw?
 
  • #12
phinds said:
You had it right in your statements and now you are complicating it. Why?
I don't know, but here the final equation:

F = /B0 * /A0
 
  • #13
That looks right.
 
  • #14
lewando said:
That looks right.
Really? How about when both numbers are odd?
 
  • #15
phinds said:
Really? How about when both numbers are odd?
if both numbers are odd it would output 0 since I am only checking the least significant bit. and the least significant bit in odd numbers will be 1. and 1 * 1 would output 0 since there are NOT gates in both inputs or am I wrong ?
 
  • #16
Max0007 said:
if both numbers are odd it would output 0 since I am only checking the least significant bit. and the least significant bit in odd numbers will be 1. and 1 * 1 would output 0 since there are NOT gates in both inputs or am I wrong ?
Sorry, I got to thinking we were doing an adder output. You and lewando are both right and I'm wrong. Now *I* was over thinking it :smile:
 
  • #17
phinds said:
Sorry, I got to thinking we were doing an adder output. You and lewando are both right and I'm wrong. Now *I* was over thinking it :smile:
No worries man, you helped me a lot today and these past days, I really appreciate it man. I just wish my teachers were a little bit better :(
 
  • #18
phinds said:
Sorry, I got to thinking we were doing an adder output. You and lewando are both right and I'm wrong. Now *I* was over thinking it :smile:
one last thing :)
If an inverter has a 2 ns propagation delay , an AND logic gate has a 5 ns propagation delay and an OR gate has a 4ns delay , what is the maximum period required by the circuit in order to update the output F ?

would I just do 2ns x 2 sicne I have 2 inverter and 5ns x1 since I only have one then add up everything ? = 4+5=9ns ?
 
  • #19
From a time-flow perspective, the inverters are operating in parallel of each other and the AND gate is in series with the inverters. You are correct to not consider a nonexistant OR gate. 9 ns would be incorrect. Rethink.
 
  • #20
lewando said:
From a time-flow perspective, the inverters are operating in parallel of each other and the AND gate is in series with the inverters. You are correct to not consider a nonexistant OR gate. 9 ns would be incorrect. Rethink.
2+5= 7 then

I
 
  • #21
Looks right!
 
  • Like
Likes Max0007
  • #22
lewando said:
Looks right!
how would I calculate it if I had 3 different gates in parallels?
 
  • #23
The worst-case delay (longest) is dominant.
 
  • Like
Likes Max0007
  • #24
lewando said:
The worst-case delay (longest) is dominant.
Nice awesome thanks.

I really learn a lot more here than in Class at the University so far.
:)
 
  • #25
University for undergrad is often overly-difficult by design. You are wise to seek additional resources to complete your understanding. Keep up the good work!
 

1. How does a detector of even numbers work in a logic circuit?

A detector of even numbers in a logic circuit works by using logic gates to determine if a number is even or odd. The circuit will have inputs for the number to be checked and outputs to indicate whether the number is even or not.

2. What are the components needed for a detector of even numbers in a logic circuit?

The components needed for a detector of even numbers in a logic circuit include logic gates such as AND, OR, and NOT gates, as well as inputs for the number to be checked and outputs to display the result.

3. Can a detector of even numbers be used for other types of numbers?

Yes, a detector of even numbers can be modified to work with other types of numbers such as odd numbers, prime numbers, or multiples of a certain number. This can be done by adjusting the logic gates and inputs in the circuit.

4. Is a detector of even numbers a reliable method for determining even numbers?

Yes, a detector of even numbers in a logic circuit is a reliable method for determining even numbers. As long as the circuit is designed correctly and the inputs are accurate, the output will always be correct.

5. Are there any limitations to using a detector of even numbers in a logic circuit?

One limitation of using a detector of even numbers in a logic circuit is that it can only check one number at a time. If you need to check multiple numbers, you will need to use multiple circuits. Additionally, the circuit may also become more complex and require more components as the numbers being checked get larger.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
14
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
14
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
26
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
13
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
26
Views
2K
Back
Top