From Zero To One

In this textbook,

  1. we begin with digital logic gates that accept 1's and 0's as inputs and produce 1's and 0's as outputs.

  2. We then explore how to combine logic gates into more complicated modules such as adders and memories.

  3. Then we shift gears to programming in assembly language, the native tongue of the microprocessor.

  4. Finally, we put gates together to build a microprocessor that runs these assembly language programs.

The Art of Managing Complexity

One of the characteristics that separates an engineer or computer scientist from a layerperson is a systematic approach to managing complexity.

Abstraction

The critical technique for managing complexity is abstraction: hiding details when they are not important. And a system can be viewed from many different levels of abstraction.

This idea of abstraction has appeared in CS2030S! For example, Data Abstraction: Type, Abstraction Barrier, Functions as an Abstraction.

In an electronic computer system, we can also find such abstraction:

1

Physics

At the lowest level of abstraction is the physics, which is about the motion of electrons. The behavior of electrons is described by quantum machanics and Maxwell's equations.

2

Devices

Our system is constructed from electronic devices such as transistors. These devices have well-defined connection points called terminals and can be modeled by the relationship between voltage and current as measured at each terminal. By abstracting to this device level, we can ignore the individual electrons.

3

Analog Circuits

The next level of abstraction is analog circuits, in which devices are assembled to create components such as amplifiers. Analog circuits input and output a continuous range of voltages.

4

Digital Circuits

Digital circuits such as logic gates restrict the voltages to discrete ranges, which we will use to indicated 0 and 1. In logic design, we build more complex structures, such as adders or memories from digital circuits.

5

Micro-architecture

(See Architecture first). Micro-architecture links the logic and architecture levels of abstraction. It involves combining logic elements to execute the instructions defined by the architecture/ISA.

Shortly speaking, the micro-architecture is an implementation of the ISA/architecture. For example, the Intel Core i7, the Intel 80486, and the AMD Athlon all implement the x86 architecture with different microarchitectures.

6

Architecture (ISA)

The architecture level describes a computer from the programmer's perspective. In other words, it's about what the programmer assumes the hardware will satisfy. It is sometimes referred to as the ISA (Instruction Set Architecture) also, which is an interface/contract between Software and Hardware. This abstract interface between the hardware and the lowest level software encompasses all the information necessary to write a machine language program, including instructions, registers, memory access I/O, ...

For example, the Intel x86 architecture used by microprocessors in most PCs is defined by a set of instructions and registers (memory for temporarily storing variables) that the programmer is allowed to use.

7

Operating System

Moving into the software realm, the operating system handles low-level details such as accessing a hard drive or managing memory.

8

Application Software

Finally, the application software uses these facilities provided by the operating system to solve a problem for the user.

Discipline

Discipline is the act of intentionally restricting your design choices so that you can work more productively at a higher level of abstraction.

In our context of this book, the digital discipline will be very important. Digital circuits use discrete voltages, whereas analog circuits use continuous voltages. Therefore, digital circuits are a subset of analog circuits and in some sense must be capable of less than the broader class of analog circuits. However, digital circuits are much simpler to design. By limiting ourselves to digital circuits, we can easily combine components into sophisticated systems that ultimately outperform those built from analog components in many applications.

The Three-Y's

In addition to abstraction and discipline, designers use the three "-y's" to manage complexity: hierarchy, modularity, and regularity.

  • Hierarchy involves dividing a system into modules, then further subdividing each of these modules until the pieces are easy to understand.

  • Modularity states that each module should have a well-defined function and interface, so that they connect together easily without unanticipated side effects.

  • Regularity seeks uniformity among the modules. Common modules are reused many times, reducing the number of distinct modules that must be designed.

These principles apply to both software and hardware systems.

The Digital Abstraction

Digital Systems represent information with discrete-valued variables — that is, variables with a finite number of distinct values.

Last updated