Digital Logic

Written by Emmanuel Schanzer

To the tune of: A Spoonful of Sugar, from Mary Poppins

To get all our programs to run
There must be compilation done
Into ones and zer-os:
Seems rather tame.

But how do ones and zeros make
Our hardware bump and shake?
Trans-..is-..tor..gates!
It won't be hard to see.

We Use...
Digital logic: inputs, switches...and grounds.
inputs, switches...and grounds.
inputs, switches...and grounds.
Just by abstracting voltage, into zer-o's and ones.
We can hack all night and day.

In simplicity we'll rate,
The effectiveness of gates
Bits of silicon
Form nand and nor

Half-adders are not trivia:
A and not B or vice versa
That answer's it
And we keep the carry bit

We Use...
Digital logic: inputs, switches...and grounds.
inputs, switches...and grounds.
inputs, switches...and grounds.
Just by abstracting voltage, into zer-o's and ones.
We can hack all night and day.

From the bus that fetches data
From the cache into the chip
The system clock keeps things working without a blip
Because every gate that does flip
Does so at a rapid clip
And hence
And hence
It's fun
It's fun
All our programs run.

Back to the Cornell CS Songbook