Skip to content
digiwleeaTools
LearnGlossaryAboutCheat sheetHow a CPU worksToolsOpen the lab →

7490 (74LS90): the decade counter chip, live

The 7490 (74LS90) is a decade counter chip: a divide-by-2 stage (QA, clocked by CKA) and a divide-by-5 stage (QB, QC, QD, clocked by CKB) that, with QA wired to CKB, count 0 to 9 in BCD on the falling edges of CKA. It also has two reset-to-zero inputs, R0(1) and R0(2), and two set-to-nine inputs, R9(1) and R9(2). This live circuit is wired for BCD.

TI's datasheet describes four master-slave flip-flops and gating "to provide a divide-by-two counter and a three-stage binary counter" whose cycle is divide-by-five, and explains how to get the full count: "the CKB input is connected to the QA output" and the count pulses go to CKA. That is how the live circuit is wired, so QD QC QB QA read the BCD count 0000 to 1001 and then wrap to 0000. The clock inputs act on the falling edge (the flip-flops in the datasheet's logic diagram have inverted clock inputs), so a count happens when CKA goes from 1 to 0. The resets are gated: both R0 inputs high clear the count, both R9 inputs high set it to 1001, and set-to-nine wins if both pairs are high; the datasheet mentions BCD nine's complement uses. Wire it the other way, QD into CKA and the pulses into CKB, and QA becomes a symmetrical divide-by-ten square wave. Here each stage is a master-slave D flip-flop with asynchronous set and clear (the A stage toggles, the B, C, D stages count 0 to 4 with DB = QB' QD', DC = QB XOR QC, DD = QB QC), clocked through inverters. Note the unusual power pins: VCC is pin 5 and GND pin 10. The live circuit opens held at zero (R0(1) = R0(2) = 1): set R0(1) to 0, then turn CKA on and off to count. Before the page is built, a 30-step sequence (reset, twelve counts through 9 and back, set to nine, one more count) is checked on all four outputs.

Big circuit: pinch, scroll or tap + to zoom in, then drag to move around.

Live circuit: click the inputs to toggle them and watch the outputs update. It runs the real simulator, right here on the page.

Open this circuit in the lab →

What you need

Step by step

  1. Place inputs CKA, R0(1), R0(2), R9(1), R9(2) and probes QA to QD.
  2. Make QA a toggle flip-flop (D = NOT QA) clocked by NOT CKA, so it changes on CKA's falling edge.
  3. Make QB, QC, QD a divide-by-5 counter clocked by NOT QA: DB = NOT (QB OR QD), DC = QB XOR QC, DD = QB AND QC. QA into this stage is the datasheet's CKB connection for BCD.
  4. Add the resets: both R9 inputs high preset QA and QD and clear QB and QC (1001); both R0 inputs high, without R9, clear all four.
  5. Release the resets and pulse CKA: the count steps 0, 1, 2, ..., 9 and back to 0.

BCD count sequence (QA wired to CKB)

CountQDQCQBQA
00000
10001
20010
30011
40100
50101
60110
70111
81000
91001

Reset inputs

R0(1)R0(2)R9(1)R9(2)Result
110X0000
11X00000
XX111001 (nine)
any other combinationcount

7490 pinout

PinNamePinName
1CKB14CKA
2R0(1)13NC
3R0(2)12QA
4NC11QD
5VCC10GND
6R9(1)9QB
7R9(2)8QC

X means the input does not matter. The count sequence, the reset table and the 14-pin pinout are from TI's SN74LS90 datasheet (SDLS940A), checked 2026-10-25. The same datasheet covers the 7492 (divide by 12) and 7493 (4-bit binary), which share the divide-by-2 stage. For a decade counter built the synchronous way, see the decade counter; for decoded outputs, the CD4017.

You can also read the full theory in the lesson on counters. Prefer to build it yourself from scratch? Open the digiwleea lab and place the gates on the canvas, or start from the logic gate simulator.

Build more parts from gates

half adderfull adderhalf subtractorfull subtractor2:1 multiplexer4:1 multiplexerXOR gate from NAND gates2-to-4 decoderSR latchD flip-flopJK flip-flopT flip-flop4-bit shift register4-bit ripple carry adderD latch1-to-4 demultiplexer4-bit magnitude comparator4-bit ring counter4-bit Johnson counter4-to-2 priority encoder4-bit synchronous counter3-to-8 decoder8-to-1 multiplexer4-bit carry lookahead adderhalf adder from NAND gates2-bit comparatorBCD to 7-segment decoder4-bit up/down counterdecade counter2-bit multiplier4-bit ALU4-bit array multiplierNOT, AND, OR and NOR from NANDNOT, OR, AND and XOR from NORfull adder from NAND gatesSR latch from NAND gatesparity generator and checker4-bit adder/subtractorBCD adder4-bit universal shift registermod-6 counter4-bit ripple counterbinary to Gray code converterhalf adder from NOR gatesfull adder from NOR gates4-bit register with parallel load1011 sequence detectorbinary to BCD converterD flip-flop from NAND gates1-bit ALUCMOS inverterCMOS NAND gateCMOS NOR gatePISO shift registerSR flip-flop from NAND gatesBCD to excess-3 code converterHamming (7,4) code encoder and correctortraffic light controller4-bit barrel shifterCMOS AND gateCMOS OR gateCMOS XOR gate1-bit magnitude comparatorhalf subtractor from NAND gatesfull subtractor from NAND gates8-to-3 encoderGray to binary converter4-to-16 decoderfull adder using 4:1 multiplexersedge detectorserial adder4-bit carry-select adder4-bit Kogge-Stone adder4-bit carry-skip adder4x4 Wallace tree multiplier8-bit adderfrequency divider (by 2, 4 and 3)switch debouncer (SR latch)3-bit Gray code counterMealy machine (1011 detector)master-slave JK flip-flop (NAND)half subtractor from NOR gates1-to-8 demultiplexerexcess-3 to BCD code convertervending machine FSM4-bit carry-save adder3-bit synchronous counter (JK)CMOS transmission gatetri-state buffer (CMOS)2-to-1 mux from transmission gatesmod-5 counterflip-flop conversion (JK to D)8-bit ALUdecimal to BCD encoderBCD to decimal decoder4-to-1 mux from 2-to-1 muxesXOR gate from NOR gates4-bit LFSR74LS138 decoderBCD subtractor74181 ALUCMOS AOI gate (AOI21)D latch vs D flip-flop74LS47 BCD to 7-segment decoder74HC595 shift register7400 quad NAND gate chip7402 quad NOR gate chip7404 hex inverter chip7408 quad AND gate chip7432 quad OR gate chip7486 quad XOR gate chip7474 dual D flip-flop74HC165 shift registerCD4017 decade counter74LS283 4-bit adder74HC161 4-bit counter

Each of these is one step from a transistor to a working CPU. Build every gate from CMOS transistors and work all the way up in the free digiwleea lab, with the free theory reference alongside.

Open the 74LS90 decade counter in the lab →

Frequently asked

How does the 7490 count to 10?

It has a divide-by-2 stage and a divide-by-5 stage. Connect QA to CKB and feed the pulses into CKA: QA toggles on every pulse, and every second pulse advances the divide-by-5 stage, so QD QC QB QA count 0 to 9 in BCD and wrap to 0.

Does the 7490 count on the rising or falling edge?

On the falling edge: the flip-flops in its logic diagram have inverted clock inputs, so the count advances when the clock goes from high to low.

What do R0 and R9 do on the 7490?

Both R0 inputs high reset the count to 0000. Both R9 inputs high set it to 1001 (nine), and this wins over R0. Each pair is ANDed, so you can tie one input of a pair high and control the other.

How do I make a divide-by-6 or divide-by-7 counter with a 7490?

Use the reset inputs: wire the outputs that are 1 at the count you want to skip to into R0(1) and R0(2). For divide by 6, QB and QC (count 6 = 0110) reset the counter as soon as it reaches 6.

Why are the 7490's power pins 5 and 10?

That is its pinout: VCC on pin 5 and GND on pin 10, unlike most 14-pin logic chips with VCC on 14 and GND on 7. Check it before wiring.