Question:

How can I build a digital circuit that counts how many inputs are high?

by  |  earlier

0 LIKES UnLike

Preferably I would like to be able to build it out of ICs that I already own, but I would also be willing to buy new ones if necessary.

I have (with IC numbers in parentheses after):

2 quad NOR gate ICs (4001)

2 quad NAND gate ICs (4011)

Quad exclusive-OR gate IC (4070)

Hex inverter IC (4049)

Quad analog switch IC (4066)

Dual D-type flip-flop (4013)

Decade counter/divider (4017)

Decade up/down counter (4029)

7-segment display decoder/driver (4511)

 Tags:

   Report

2 ANSWERS


  1. you didn't mention how many inputs you need to count.

    Basically you need a special decoder circuit, and you can do that with a ROM. This IC may already exist, I'll do some looking.

    for 4 inputs

    inputs  outputs

    0000 . . . 000

    0001 . . . 001

    0010 . . . 001

    0011 . . . 010

    0100 . . . 001

    0101 . . . 010

    0110 . . . 010

    0111 . . . 011

    1000 . . . 001

    1001 . . . 010

    1010 . . . 010

    1011 . . . 011

    1100 . . . 010

    1101 . . . 011

    1110 . . . 011

    1111 . . . 100

    .


  2. How many inputs have you got?

    That will also tell you how many output lines you need.  (if you have 3 inputs, you will need 2 outputs; 4 to 7 inputs, 3 outputs; 8 to 15 inputs, 4 outputs, and so forth.)

    Write down the logic function in terms of a group of ANDs being ORed together, then simplify as far as possible.  Build whatever is left.

Question Stats

Latest activity: earlier.
This question has 2 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.
Unanswered Questions