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

74HC374 (74LS374): the octal D flip-flop register chip, live

The 74HC374 is an 8-bit register: eight edge-triggered D flip-flops with tri-state outputs. On each rising edge of CLK, the outputs 1Q to 8Q take the values on 1D to 8D and then hold them, whatever the inputs do, until the next edge. The active-low output enable OE floats the outputs while it is HIGH. This live circuit has all eight flip-flops.

In TI's words, "on the positive transition of the clock (CLK) input, the Q outputs are set to the logic levels that were set up at the data (D) inputs", and OE only switches the outputs between driving and high impedance: "OE does not affect the internal operations of the flip-flops. Old data can be retained or new data can be entered while the outputs are in the high-impedance state." That makes it a ready-made 8-bit register for a bus: clock a value in, then enable its outputs only when it is this register's turn to drive the bus. Each flip-flop here is the master-slave D flip-flop followed by a transistor-level tri-state buffer. Its level-sensitive twin is the 74HC373. Here CLK is a plain switch. The live chip opens with OE low; the outputs are unknown until the first rising edge of CLK, as on a powered-up chip. Before the page is built, an 11-step sequence (load, inputs changing between edges, a load while the outputs float, and outputs back on) is checked on all eight 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 OE, CLK, 1D to 8D and probes 1Q to 8Q.
  2. Give each input a D flip-flop clocked by CLK.
  3. Follow each flip-flop with a tri-state buffer enabled by NOT OE.
  4. Set a pattern on the D inputs and turn CLK on: the outputs load it. Change the inputs: nothing happens until the next rising edge.

74HC374 function table (each flip-flop)

OECLKDQ
0rising11
0rising00
0not risingXheld value
1XXZ (the flip-flop still loads on a rising edge)

74HC374 pinout

PinNamePinName
1OE (active low)20VCC
21Q198Q
31D188D
42D177D
52Q167Q
63Q156Q
73D146D
84D135D
94Q125Q
10GND11CLK

X means the input does not matter; Z is high impedance. The behavior and the 20-pin pinout are from TI's SN74HC374 datasheet (SCLS141G), checked 2026-10-25; it runs from 2 V to 6 V. The 74HC373 has the same pinout with LE on pin 11.

You can also read the full theory in the lesson on registers. 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 latchTurnstile state machine1-to-2 demultiplexerhalf adder using 2:1 multiplexersregister file (4 x 4-bit)

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 74HC374 octal D flip-flop in the lab →

Frequently asked

What does the 74HC374 do?

It is an 8-bit register made of eight positive-edge-triggered D flip-flops with tri-state outputs. Each rising edge of CLK loads the eight D inputs; OE high puts the outputs in high impedance.

Does OE affect the stored data on the 74HC374?

No. TI's datasheet says OE does not affect the internal operation of the flip-flops: old data can be kept, or new data clocked in, while the outputs are in the high-impedance state.

What is the difference between the 74HC374 and the 74HC574?

The logic is the same; the 574 arranges the pins with all inputs on one side and all outputs on the other, which is easier to route on a circuit board.

What is the difference between the 74HC374 and the 74HC373?

The 374 loads on the rising edge of CLK, so its outputs change only once per clock; the 373 is transparent while LE is high, so its outputs follow the inputs for as long as LE stays high.