Session 2: Analog basics¶
Last Thursday (19/02/2026), Jennifer Volk delivered an accessible “Electronics 101” introduction that connected the physical side of electronics to what we’ll do later in chip design. She started with electrons, conductors vs. insulators vs. semiconductors, and used the water analogy to make voltage/current/resistance intuitive, anchoring everything with Ohm’s law (V = I·R). From there, she covered the core passive components ((R - Resistor, C - Capacitor, L Inductor) and why parasitics in real wires matter—especially in processors—because resistance and capacitance directly shape delay, signal integrity, and power behavior.
In the second part, she introduced transistors (NMOS/PMOS) and how they act like controllable “valves,” then bridged into binary logic where voltage levels represent 1s and 0s, and built up logic gates (AND/OR/NOT) with truth tables. She then showed how CMOS gates are constructed with a key structural rule, and reinforced the concepts through SPICE simulation: what a netlist is, basic device syntax, transistor models, voltage sources, and how to run/interpret a simple gate simulation. The session closed with two practical reliability topics for real hardware: clock distribution (why synchronization is hard and typical solutions) and the Schmitt trigger as a clean way to handle noisy inputs using hysteresis.
In addition to diving deeper into all these new concepts, we need to complete the following tasks:
- Modify the AND gate netlist to create an OR gate instead
- Schmitt trigger analysis: Look up a CMOS Schmitt trigger schematic and identify which transistors set the upper vs lower threshold
- Optional: Build a simple circuit (LED + resistor + button) in Tinkercad and observe current flow
Modify the AND gate netlist to create an OR gate instead¶
For this task, starting from the AND-gate netlist, we need to create the OR gate.

* 1 V power supply
vsup VDD 0 1
* AND pull-up network -- two pmos in parallel
Mp1 nOUT A VDD VDD mosp L=0.35u W=2u
Mp2 nOUT B VDD VDD mosp L=0.35u W=2u
* Pull-down network -- two nmos in series
Mn1 nOUT A npd 0 mosn L=0.35u W=2u
Mn2 npd B 0 0 mosn L=0.35u W=2u
* Inverter, or a logical NOT
Mp3 AND nOUT VDD VDD mosp L=0.35u W=2u
Mn3 AND nOUT 0 0 mosn L=0.35u W=2u

In this case, Mp1 and Mp2 must be connected in series, and Mn1 and Mn2 in parallel.

* 1 V power supply
vsup VDD 0 1
* OR pull-up network -- two pmos in series
Mp1 npu A VDD VDD mosp L=0.35u W=2u
Mp2 nOUT B npu VDD mosp L=0.35u W=2u
* Pull-down network -- two nmos in parallel
Mn1 nOUT A 0 0 mosn L=0.35u W=2u
Mn2 nOUT B 0 0 mosn L=0.35u W=2u
* Inverter, or a logical NOT
Mp3 AND nOUT VDD VDD mosp L=0.35u W=2u
Mn3 AND nOUT 0 0 mosn L=0.35u W=2u
Thinkercad¶
Tinkercad is a free, browser-based platform by Autodesk for simple 3D design, electronics, and coding. It’s commonly used for quick prototyping and learning, including breadboard circuit simulations.
Years ago I used it to teach 3D modeling to kids, but I had never used it to simulate electronic circuits. For circuit prototyping, I used to use Fritzing. Although these days I only use KiCad.
Here is the Tinkercad example of the breadboard setup, along with a simulation showing how it works.

When running the simulation in Tinkercad, pressing button A or B, or both, turns the LED on.

ngspice¶
ngspice is an open-source SPICE circuit simulator used to analyze analog and mixed-signal electronic circuits. It can run netlists to simulate voltages, currents, and transient/AC/DC behavior before building hardware.
After Julian updated the course tools server, we now have the AND, OR, and Schmitt trigger examples available in the working environment. With them, we can run these circuits and simulate them in ngspice.

This is the code inside AND.sp

From the terminal, we can open each example by typing: ngspice and.sp
Once ngspice is running, we can enter additional commands. Right now it shows, in two separate windows, the voltage on A and B. If we want to see the AND output, we should type: plot v(AND)
When A and B are pressed at the same time, the AND condition is satisfied.
Here I show the region where both buttons are pressed at the same time.
But we can also plot multiple values in a window; to do that, we use the following command in ngspice plot v(a) v(b) v(AND).

Now we’re going to simulate the OR example, and then plot v(OR).


Schmitt trigger analysis¶
A Schmitt trigger analysis is the process of evaluating a Schmitt trigger’s behavior—especially its hysteresis, meaning it switches ON and OFF at different input voltage thresholds to reject noise and produce a clean digital output from a slow or noisy signal.

For this task, I built the circuit (the breadboard setup) in Tinkercad and used its simulation to test how the Schmitt trigger responds as the input changes.

Button pull up - pull down¶
Pull-up and pull-down resistors ensure a stable logic level (high or low) on a microcontroller’s input pins when a button is not pressed, preventing erratic readings caused by noise. The main difference is the idle state: a pull-up keeps a logic “1” (+VCC) and switches to “0” when pressed, while a pull-down keeps a logic “0” (GND) and switches to “1” when pressed.
Key differences¶
Idle configuration (button released): - Pull-Up: The pin is connected to VCC through a resistor, resulting in a HIGH (1) state. - Pull-Down: The pin is connected to GND through a resistor, resulting in a LOW (0) state.
Behavior when pressed:
- Pull-Up: Pressing the button connects the pin to GND, changing it to logic 0.
- Pull-Down: Pressing the button connects the pin to VCC, changing it to logic 1.
Common use: Pull-up resistors are more widely used, especially on microcontroller inputs (e.g., Arduino), because many boards include internal pull-up resistors, reducing the need for external components.
Safety: Both configurations prevent a short circuit between VCC and GND when the button is pressed by limiting current through the resistor.
Pull-Up example in Thinkercad

Pull-Down example in Thinkercad

A challenging week, and an exciting road ahead¶
This week has been quite challenging, with a lot of new concepts, tools, and workflows to absorb in a short amount of time. At the same time, it’s been extremely rewarding, and it’s clear that the next few weeks are going to be even more interesting as we start connecting these fundamentals to real design and simulation work. I’m genuinely excited to keep going.