0
\$\begingroup\$

Like the title, anyone know how to draw a circuit diagram to check a 4 bits number odd or even ?? Update: Here are my truth table for my solution:

  • A B C D Output
  • 0 0 0 0 0
  • 0 0 0 1 1
  • 0 0 1 0 0
  • 0 0 1 1 1
  • 0 1 0 0 0
  • 0 1 0 1 1
  • 0 1 1 0 0
  • 0 1 1 1 1
  • 1 0 0 0 0
  • 1 0 0 1 1
  • 1 0 1 0 0
  • 1 0 1 1 1
  • 1 1 0 0 0
  • 1 1 0 1 1
  • 1 1 1 0 0
  • 1 1 1 1 1

Due to the output is odd or even is depend on the LSB. So D colum = output. Im i right? If so how can i draw circuit base on this truth table? Im gonna use Sum Of Product method but not so sure how to use in this case 0 and 1 and 0 and 1......

\$\endgroup\$
  • 2
    \$\begingroup\$ It doesn't matter how many bits it has. If the lowest bit is 0 the number is even; if it's 1 the number is odd. \$\endgroup\$ – Pete Becker Jul 21 '13 at 14:11
  • 4
    \$\begingroup\$ If this is for some course, you're missing something very fundamental and it doesn't bode well for continued success. I recommend sitting down with your instructor. \$\endgroup\$ – Scott Seidman Jul 21 '13 at 15:49
  • \$\begingroup\$ D column = output. Yes, you're right. No need to use sum of products or any other method. \$\endgroup\$ – Renan Jul 21 '13 at 15:50
  • \$\begingroup\$ When you edit away the question that people have already spent time trying to answer, you are not respecting the work they did trying to help you, and you are not helping future readers who might have a similar question. \$\endgroup\$ – The Photon Jul 21 '13 at 16:22
  • 1
    \$\begingroup\$ Surely this question should really have been about odd or even parity and not odd or even numerically? \$\endgroup\$ – Andy aka Jul 21 '13 at 17:28
6
\$\begingroup\$

If the least significant bit (lsb) of a binary number is set, that's an odd number. If the lsb is cleared, that's an even number. There's no need for any circuit, just connect the lsb of the input to the output.

Edit 2

If you insist on using some kind of chips in your design, you can use inverters and buffers. Here I draw the circuit with two inverters, because that's probably cheaper than using an inverter for EVEN and a buffer for ODD:

schematic

simulate this circuit – Schematic created using CircuitLab

Edit 3 About your truth table. Yes, if you want a high output for an odd input, just copy the D input column to the output column.

You can then construct a sum of products solution like

(A B C D) + (A B ~C D) + (A ~B C D) + (A ~B ~C D) + ...

But when you simplify it, you'll just get "OUT = D".

Which you could implement with a simple wire. Or with a buffer.

\$\endgroup\$
  • \$\begingroup\$ But im required to draw this diagram, plz help \$\endgroup\$ – raku Jul 21 '13 at 14:16
  • 3
    \$\begingroup\$ Draw a diagram of a circuit where the lsb of the input connects to the output. It's basically a wire with one end labelled "IN[0]" and one end labelled "OUT". \$\endgroup\$ – The Photon Jul 21 '13 at 14:22
  • 4
    \$\begingroup\$ This deserves a badge for triviality! Well done, a very thorough exercise in futility! \$\endgroup\$ – travisbartley Jul 21 '13 at 14:29
  • \$\begingroup\$ I know how it work but what i want is draw a circuit with digital gates and i really dont know how, i did spend half a day for searching this but there i cant find any solution. Much appreciate if u can help. \$\endgroup\$ – raku Jul 21 '13 at 14:45
  • 1
    \$\begingroup\$ If you absolutely have to include a "digital gate", you can just put a buffer in the line. Or an inverter if you want a high output for even instead of for odd. \$\endgroup\$ – The Photon Jul 21 '13 at 14:47
2
\$\begingroup\$

This question is like how do I draw the circuit of a battery, or a wire. Surely the depth to which a question can be regarded as trivial has hit a new low. Somewhere, I have a feeling that something was lost in translation and the actual question was, some time ago "How to draw a circuit diagram to check a 4 bits number is odd or even parity".

Don't bother down-voting or voting because I'm just gonna post a very simple circuit that checks parity and I'm sure nearly everyone on this site will know it and therefore no credit or discredit is needed for trying to reinterpret the question: -

enter image description here

\$\endgroup\$
  • \$\begingroup\$ Your dia could be helpful, but i dont really understand it, could u explain it more. Thx. \$\endgroup\$ – raku Jul 22 '13 at 3:04
  • \$\begingroup\$ @raku - are you trying to check parity of the 4 bits? \$\endgroup\$ – Andy aka Jul 22 '13 at 7:00
  • \$\begingroup\$ yes, check the parity of 4 bits number if the number is even, output should be 1, otherwise 0 \$\endgroup\$ – raku Jul 22 '13 at 7:37
  • \$\begingroup\$ @raku - the devices shown are two input exclusive or gates. Here's a link to understand them hyperphysics.phy-astr.gsu.edu/hbase/electronic/xor.html there are usually 4 gates in one IC such as 74HC86 - this has 14 pins (12 for the four devices and two pins power power and ground). Try googling this to see if it makes more sense. \$\endgroup\$ – Andy aka Jul 22 '13 at 8:15
  • 1
    \$\begingroup\$ @raku - if it is a parity check circuit you need you should consider re-wording the question because your own question does not say this and your output column is just showing when a number is odd like 1, 3, 5, 7 etc.. Odd parity would be 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 0, 1, 1, 0 for 0 to 15. \$\endgroup\$ – Andy aka Jul 22 '13 at 8:21
1
\$\begingroup\$

If the LSB of a binary number is 0 it is even, odd otherwise.

\$\endgroup\$
  • \$\begingroup\$ I just new and want to know how to draw the circuit for this requirement, plz help \$\endgroup\$ – raku Jul 21 '13 at 14:18
  • 2
    \$\begingroup\$ Seriously: it's just a line that goes from the least significant bit to the output. (noticed that it was wrong after the 5 minute edit window for comments) \$\endgroup\$ – Renan Jul 21 '13 at 14:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.