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

74LS193 (74HC193): the 4-bit up/down counter chip, live

The 74LS193 is a synchronous 4-bit binary counter with two clocks: it counts up on a rising edge of UP and down on a rising edge of DOWN, the other clock held high. LOAD (active low) presets the count from inputs A to D, CLR (active high) clears it, and CO and BO pulse low on overflow and underflow for cascading. This live circuit is the whole chip.

TI's datasheet describes the '193 as a synchronous reversible (up/down) counter "having a complexity of 55 equivalent gates", where "synchronous operation is provided by having all flip-flops clocked simultaneously so that the outputs change coincidentally with each other", which "eliminates the output counting spikes normally associated with asynchronous (ripple-clock) counters". The direction is set by which count input is pulsed while the other is high. LOAD presets the outputs to the data inputs independently of the count pulses, which lets the chip divide by any number up to 16 (a modulo-N divider), CLR forces all outputs low regardless of the count and LOAD inputs, and for longer counts the borrow and carry outputs feed the DOWN and UP inputs of the next chip. This version models that behavior with its own logic rather than copying the chip's gate diagram: four master-slave D flip-flops with asynchronous preset and clear share one clock, UP AND DOWN, which rises when the pulsed input returns high; a two-NAND latch remembers which input went low; and the next count is Q + 1 or Q - 1, where a bit toggles when every lower bit is 1 (counting up) or 0 (counting down), as in the up/down counter. LOAD drives each flip-flop's preset or clear from its data bit, and CLR overrides LOAD. The live chip opens with CLR high and UP low (so the direction latch starts in a known state): set CLR to 0, then turn UP on, and the count becomes 1. Before the page is built, a 95-step sequence is checked on all six outputs: counting up through 15 and around, down through 0 and around, loading 1010 while idle and in the middle of a count pulse, and CLR overriding LOAD.

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 UP, DOWN, LOAD, CLR and A to D, and probes QA to QD, CO and BO.
  2. Clock four D flip-flops together from UP AND DOWN, and let a NAND latch record which of UP and DOWN went low.
  3. Give each flip-flop D = Q XOR T, where T is 1 when all lower bits are 1 (up) or all 0 (down); QA always toggles.
  4. Wire LOAD and CLR to the presets and clears, and build CO and BO. Pulse UP low and high: the count goes up by one. Pulse DOWN: down by one.

74LS193 function table

CLRLOADUPDOWNWhat happens
1XXXClear: QA to QD all 0
00XXLoad: QA to QD take A to D at once
01rising1Count up by one
011risingCount down by one
0111Hold

74LS193 pinout

PinNamePinName
1B16VCC
2QB15A
3QA14CLR
4DOWN13BO (active low)
5UP12CO (active low)
6QC11LOAD (active low)
7QD10C
8GND9D

X means the input does not matter; QA is the least significant bit. The behavior and the 16-pin pinout are from TI's SN74LS193 datasheet (SDLS074) and SN74HC193 datasheet (SCLS122D), checked 2026-10-25; the two share the pinout, and the 74HC193 runs from 2 V to 6 V. The 74LS192 in the same datasheet is the BCD version, counting 0 to 9.

You can also read the full theory in the lesson on synchronous 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 adder74LS90 decade counter74HC161 4-bit counter74HC151 8-to-1 multiplexer74HC157 quad 2-to-1 multiplexer74HC139 dual 2-to-4 decoderCD4511 BCD to 7-segment decoder7492 divide-by-12 counter7493 4-bit binary counter74HC244 octal bufferRace-around condition (JK latch)74HC373 octal latch74HC374 octal D flip-flopTurnstile state machine1-to-2 demultiplexerhalf adder using 2:1 multiplexersregister file (4 x 4-bit)digital PWM generatorCD4013 dual D flip-flop74LS76 dual JK flip-flop7410 triple 3-input NAND chip7411 triple 3-input AND chip7420 dual 4-input NAND chipCD4011 quad 2-input NAND chipCD4001 quad 2-input NOR chipCD4081 quad 2-input AND chipCD4069 hex inverter chip74HC164 8-bit shift register7485 4-bit magnitude comparator74HC125 quad tri-state bufferCD4040 12-stage binary counterCD4060 14-stage counter and oscillatorelectronic dice circuitmemory address register (MAR) and MDRhardware stack with a stack pointerdirect-mapped cache8-bit Brent-Kung adder4x4 Dadda multiplierbinary clock circuit

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 74LS193 4-bit up/down counter in the lab →

Frequently asked

What does the 74LS193 do?

It is a 4-bit binary counter that counts up on rising edges of its UP input and down on rising edges of its DOWN input. It can be preset to any value with LOAD and cleared with CLR, and its CO and BO outputs let several chips count past 15.

How do you make a 74LS193 count down?

Hold UP high and pulse DOWN low then high: each rising edge of DOWN subtracts one. Counting up is the same with the inputs swapped.

How do you cascade two 74LS193 counters?

Connect CO of the first chip to UP of the second and BO of the first to DOWN of the second. The first chip's carry and borrow pulses then count the second chip up or down, giving 8 bits.

What is the difference between the 74LS192 and the 74LS193?

The 74LS192 counts in BCD, 0 to 9, and the 74LS193 in binary, 0 to 15. TI documents both in one datasheet with the same pinout.