Clear all

Forum 2

Tech Chat Understanding J-K Flip-Flop

3 Posts
3 Users
Illustrious Member Admin
Topic starter

John mentioned this in the HMV 2627;Thorn 4000 series thread, in relation to fault-finding the ultrasonic receiver. Also, that it's all a bit rusty in the grey-matter. Here's a good refresher course.

Added the following as reference for my benefit and perhaps others who need a refresher, taken from online sources.

What is a Logic Level?
Put simply, a logic level is a specific voltage or a state in which a signal can exist. We often refer to the two states in a digital circuit to be ON or OFF. Represented in binary, an ON translates to a binary 1, and an OFF translates to a binary 0. We call these signals HIGH or LOW, respectively. There are several different technologies that have evolved over the past 30 years in electronics to define the various voltage levels.

Logic 0 or Logic 1
Digital electronics rely on binary logic to store, process, and transmit data or information. Binary Logic refers to one of two states -- ON or OFF. This is commonly translated as a binary 1 or binary 0. A binary 1 is also referred to as a HIGH signal and a binary 0 is referred to as a LOW signal.

The strength of a signal is typically described by its voltage level. How is a logic 0 (LOW) or a logic 1 (HIGH) defined? Manufacturers of chips generally define these in their spec sheets. The most common standard is TTL or Transistor-Transistor Logic.

Active-Low and Active-High
When working with ICs and microcontrollers, you'll likely encounter pins that are active-low and pins that are active-high. Simply put, this just describes how the pin is activated. If it's an active-low pin, you must "pull" that pin LOW by connecting it to ground. For an active high pin, you connect it to your HIGH voltage (usually 3.3V/5V).

For example, let's say you have a shift register that has a chip enable pin, CE. If you see the CE pin anywhere in the datasheet with a line over it like this, CE, then that pin is active-low. The CE pin would need to be pulled to GND in order for the chip to become enabled. If, however, the CE pin doesn't have a line over it, then it is active high, and it needs to be pulled HIGH in order to enable the pin.

Many ICs will have both active-low and active-high pins intermingled. Just be sure to double check for pin names that have a line over them. The line is used to represent NOT (also known as bar). When something is NOTTED, it changes to the opposite state. So if an active-high input is NOTTED, then it is now active-low. Simple as that!

TTL Logic Levels
A majority of systems we use rely on either 3.3V or 5 V TTL Levels. TTL is an acronym for Transistor-Transistor Logic. It relies on circuits built from bipolar transistors to achieve switching and maintain logic states. Transistors are basically fancy-speak for electrically controlled switches. For any logic family, there are a number of threshold voltage levels to know. Below is an example for standard 5V TTL levels:

VOH -- Minimum OUTPUT Voltage level a TTL device will provide for a HIGH signal.

VIH -- Minimum INPUT Voltage level to be considered a HIGH.

VOL -- Maximum OUTPUT Voltage level a device will provide for a LOW signal.

VIL -- Maximum INPUT Voltage level to still be considered a LOW.

Forum 3


You will notice that the minimum output HIGH voltage (VOH) is 2.7 V. Basically, this means that output voltage of the device driving HIGH will always be at least 2.7 V. The minimum input HIGH voltage (VIH) is 2 V, or basically any voltage that is at least 2 V will be read in as a logic 1 (HIGH) to a TTL device.

You will also notice that there is cushion of 0.7 V between the output of one device and the input of another. This is sometimes referred to as noise margin.

Likewise, the maximum output LOW voltage (VOL) is 0.4 V. This means that a device trying to send out a logic 0 will always be below 0.4 V. The maximum input LOW voltage (VIL) is 0.8 V. So, any input signal that is below 0.8 V will still be considered a logic 0 (LOW) when read into the device.

What happens if you have a voltage that is in between 0.8 V and 2 V? Well, your guess is as good as mine. Honestly, this range of voltages is undefined and results in an invalid state, often referred to as floating. If an output pin on your device is “floating” in this range, there is no certainty with what the signal will result in. It may bounce arbitrarily between HIGH and LOW.

Here is another way of looking at the input / output tolerances for a generic TTL device.

Forum 4

Posted : 02/08/2022 9:16 pm
Noble Member

Hmm, I think I’m going to have watch that a few times 🤣 🤣 🤣 

Posted : 02/08/2022 9:40 pm
Till Eulenspiegel
Illustrious Member

Another tutorial about the J-K flip-flop.

JK Flip Flop and the Master-Slave JK Flip Flop Tutorial (

Till Eulenspiegel.

Posted : 03/08/2022 11:09 am