Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Digital & Analogue Electronics

Welcome to the interactive demonstrations for EEN1022 Digital & Analogue Electronics, an undergraduate module at Dublin City University.

Every page here holds a circuit you can push rather than a circuit you can only read about. Set the inputs and watch the outputs follow. Step a circuit through one gate at a time and see where each value came from. Draw your own waveforms and let the demonstration work out what the outputs do with them. Every value on every page is computed from the same logic the circuit itself describes, so the schematic, the truth table and the timing diagram cannot disagree with one another.

That matters more in this subject than it might seem. A truth table is a list of claims about a circuit, and a claim you have checked yourself is worth considerably more than one you have copied down.

The demonstrations are run live in lectures, and you can run them yourself at the same time.

Everything runs in your browser. There is no account to create, nothing to install and nothing to download, so a laptop, a tablet or a phone will all do. If a demonstration is being worked through on the screen at the front, open the same page and follow along at your own pace: pause on the step you are unsure about, try the input combination you were about to ask about, and catch up afterwards.

Nothing you do can break anything. Every demonstration can be put back to where it started by reloading the page, and the ones that hold a state have a button that makes them forget it, so the most useful thing you can do is change something and find out what happens.

They are also worth coming back to on your own. Working through a demonstration a second time, a week later, without the amazing commentary in the lecture to lean on, is a better test of whether you have understood a circuit than reading your notes again.

The demonstrations follow the treatment given in Lessons in Electric Circuits, Volume IV: Digital by Tony R. Kuphaldt, which is the recommended reading for the digital half of the module:

It is a genuinely good book and it is free, which is a rare combination. It is released under the Design Science License, and that is what makes these demonstrations possible: the licence allows the material to be copied, adapted and built on, so the circuits here are the ones you will meet in the reading rather than a different set that happens to look similar.

The intended way to use the two together is to read the chapter and then open the matching demonstration, or the other way round if you prefer to see a thing working before you read about why it works.

The order of the demonstrations is not random: each section establishes the physical or logical foundations that the subsequent circuits rely on, and several demonstrations are designed to be read as pairs across sections.

  1. Demo 1.1: What a Digit Is Worth
  2. Demo 1.2: Three Ways to Change Base
  3. Demo 1.3: Arithmetic Without a Minus Sign
  4. Demo 1.4: How Big Is the Box?

These first four come before everything else because a digital circuit does not contain numbers, it contains voltages, and every adder and counter after them works only because a group of those voltages has been agreed to mean a quantity. The demonstration on binary arithmetic works out by hand what an adder has to do, so the carry you step along a row of columns here turns up directly as a wire between two gates in Section 5.

  1. Demo 2.1: Pull-up and Pull-down Resistors
  2. Demo 2.2: Before You Wire Anything
  3. Demo 2.3: Switches, Contact Bounce and Relays

These three come before the components because a circuit that is wired wrongly will not demonstrate anything, however well you understand the truth table, and because the practical faults they cover are the ones that actually cost laboratory time. The pull-resistor demonstration sizes a resistor for an LED using Ohm’s law and a fixed forward voltage, pairing directly with the diode demonstrations in the next section that show where that forward voltage comes from and what it is really doing.

The switches demonstration closes the practical section and reaches furthest forward. Its first half is vocabulary that the mechanical switch circuits later in the reading cannot be followed without, and it sets up Boolean algebra by introducing contacts in series and in parallel before any gate has been drawn. Its second half is about the few milliseconds after a contact closes, which is invisible until something fast is connected to it: the counters in Section 6 treat every one of those rebounds as a clock edge, and the Arduino at the end of the module is where the cure finally gets written down as code. It pairs naturally with the breadboard demonstration before it, since both are about the difference between a circuit that is correct on paper and a circuit that works on the bench.

  1. Demo 3.1: Diodes, from Switch to Curve
  2. Demo 3.2: Turning AC into DC
  3. Demo 3.3: Zener Diodes and LEDs
  4. Demo 3.4: Transistors, from Switch to Amplifier
  5. Demo 3.5: Amplifier Stages, and Choosing the Operating Point

These five demonstrations are about continuous voltages and currents rather than about logic. The transistor demonstration reuses the load line from the diode demonstration on a device with a third terminal, which turns the method from a way of solving one awkward circuit into the way every amplifier is biased. It also builds a NOT, an AND and an OR gate out of single transistors, so the gates in the digital half of the module stop being black boxes: transistors in series make an AND and transistors in parallel make an OR, and that association holds all the way up to the chips on the bench.

The amplifier demonstration is the other half of that pair, and the two are best read together. The transistor page ends by observing that beta varies threefold between parts with the same number on them, and the amplifier page is largely about what to do with that observation: a bias arrangement that hands the operating point to beta and one that does not, with the same four resistors solved for all three transistors so the difference is a number rather than a claim. It then puts a signal on the operating point and finds that a common emitter stage produces a visibly lopsided output long before anything is clipped, which is a more useful thing to know about the exponential than any amount of algebra about it.

  1. Demo 4.1: Logic Gates and What They Are For
  2. Demo 4.2: One Gate to Rule Them All
  3. Demo 4.3: The Rules of the Game
  4. Demo 4.4: Fewer Gates, Same Answer
  5. Demo 4.5: Moving the Inversions
  6. Demo 4.6: Reading the Map
  7. Demo 4.7: Bigger Maps and Cells That Do Not Matter

Here the subject formalises into logic. Each demonstration takes something the one before it left unfinished, starting from the basic truth tables of individual gates, proving universality with NAND and NOR, establishing the algebraic identities that govern simplification, and concluding with Karnaugh mapping where adjacent Gray-coded cells turn algebraic reduction into a visual exercise.

  1. Demo 5.1: Designing a Seven-Segment Decoder
  2. Demo 5.2: Half Adders, Full Adders and Carry
  3. Demo 5.3: Decoders, Encoders, Multiplexers and Demultiplexers

Combinational circuits compute outputs based strictly on their current inputs, with no internal state or memory. The half adder and full adder demonstrations build the practical circuit that implements the pencil-and-paper addition explored in Section 1, while decoders and multiplexers show how binary codes are translated into physical display drives or routed between multiple buses without retaining state.

  1. Demo 6.1: Latches
  2. Demo 6.2: Flip-Flops
  3. Demo 6.3: Clocks and the Binary Count Sequence
  4. Demo 6.4: Asynchronous Counters, and Why They Ripple
  5. Demo 6.5: Synchronous Counters, and the Price of Getting It Right
  6. Demo 6.6: Registers, and Circuits That Walk a Chosen Sequence

The latch is where the subject changes character: everything up to it has outputs that are a function of its inputs, and everything from it onwards has a memory of what happened earlier. Flip-flops eliminate transparency by restricting transitions strictly to clock edges. The binary count sequence demonstration is the pivot into the counters, establishing that the columns of a binary count are square waves at halving frequencies. The counter demonstrations then build the circuits and price the difference between them: the asynchronous ripple counter chained out of dividers with cascading propagation delay, and the synchronous counter tying every clock together with AND gating. Registers complete the sequence by demonstrating state loops and data shifting.

  1. Demo 7.1: From Voltage to Number, and Back
  2. Demo 7.2: The Arduino, and What a Program Actually Does

This section is where the two halves of the module meet: a physical sensor input becomes a voltage, a voltage becomes a number, and a number becomes something the world can see again. The Arduino demonstration puts a processor on top of all of that, and is deliberately the last thing in the module rather than the first, because none of the limits the electronics imposes goes away when a program is added to it.

Puzzles rather than demonstrations. They are a genuinely good way to find out whether you can produce a term rather than merely recognise one, which is the direction that matters when you are asked to explain something out loud.