UNIHIVE

Study Hub UNIPORT CSC 284

CSC 284 · Introduction to Logic Design

Digital and analogue systems

What makes a signal digital, why computers use two levels, and how bits become data.

Our notes

2 min read

Analogue and digital

An analogue quantity can take any value in a range: the temperature of a room, the voltage from a microphone, the position of a needle on a gauge. A digital quantity takes only a few separate values. In computers there are just two, written 0 and 1.

Why two levels?

  • A circuit only has to tell "low" from "high", so small changes from noise or temperature do no harm.
  • Two-state devices (a transistor on or off, a capacitor charged or not, a magnetised spot pointing one way or the other) are cheap, small and fast.
  • Two-valued logic (true or false) has a complete mathematics, Boolean algebra, for designing circuits.

Logic levels

In a 5 V TTL circuit a voltage of 0 to 0.8 V counts as 0 and 2.0 to 5 V counts as 1; the gap between is not allowed. In 3.3 V circuits the levels are lower. Using high voltage for 1 is positive logic; the opposite is negative logic.

Bits, bytes and words

  • Bit: one binary digit.
  • Nibble: 4 bits. Byte: 8 bits (256 patterns).
  • Word: the number of bits a processor handles at once (16, 32 or 64).
  • n bits give 2ⁿ patterns: 10 bits give 1,024.

Everything is data

A bit pattern has no meaning until we choose a code. The byte 0100 0001 is the number 65, the letter "A" in ASCII, or part of a machine instruction, depending on how the program reads it. Instructions are stored in memory in the same way as numbers: this is the stored-program idea of von Neumann.

Converting between the two worlds

  • ADC (analogue-to-digital converter): samples a signal at fixed times and gives each sample a binary number. An 8-bit ADC on a 0-5 V range has steps of 5 ÷ 256 ≈ 19.5 mV.
  • DAC (digital-to-analogue converter): turns numbers back into voltages, as in a phone's headphone output.

Worked example

A 10-bit ADC measures 0 to 3.3 V. How big is one step, and what code does 1.65 V give?

  • Step = 3.3 ÷ 1,024 ≈ 3.22 mV.
  • 1.65 ÷ 3.3 × 1,024 = 512, so the code is 10 0000 0000.

Digital computers

A digital computer has a processor (control unit, arithmetic and logic unit, registers), memory, and input and output, joined by buses. Every part is built from the gates in later topics.

Exams usually ask

  • Contrast analogue and digital systems with examples; give advantages of digital.
  • How many patterns n bits give, and ADC step sizes.

Common mistake

Thinking a bit pattern has one fixed meaning: the same byte can be a number, a letter or an instruction.

Written by the UniHive team in our own words. Spotted a mistake? Tell us on WhatsApp.

Read

Watch

Practise

We link to free material and never copy it. Every link was opened by our team before it went up; video data is a rough guide at 360p.

All CSC 284 topics

Report

Sign in to report this. It is free.

Is this your work (a lecturer, author or publisher)? Ask us to take it down.