\[ \begin{align}\begin{aligned}\newcommand\blank{~\underline{\hspace{1.2cm}}~}\\% Bold symbols (vectors) \newcommand\bs[1]{\mathbf{#1}}\\% Differential \newcommand\dd[2][]{\mathrm{d}^{#1}{#2}} % use as \dd, \dd{x}, or \dd[2]{x}\\% Poor man's siunitx \newcommand\unit[1]{\mathrm{#1}} \newcommand\num[1]{#1} \newcommand\qty[2]{#1~\unit{#2}}\\\newcommand\per{/} \newcommand\squared{{}^2} \newcommand\cubed{{}^3} % % Scale \newcommand\milli{\unit{m}} \newcommand\centi{\unit{c}} \newcommand\kilo{\unit{k}} \newcommand\mega{\unit{M}} % % Percent \newcommand\percent{\unit{{\kern-4mu}\%}} % % Angle \newcommand\radian{\unit{rad}} \newcommand\degree{\unit{{\kern-4mu}^\circ}} % % Time \newcommand\second{\unit{s}} \newcommand\s{\second} \newcommand\minute{\unit{min}} \newcommand\hour{\unit{h}} % % Distance \newcommand\meter{\unit{m}} \newcommand\m{\meter} \newcommand\inch{\unit{in}} \newcommand\foot{\unit{ft}} % % Force \newcommand\newton{\unit{N}} \newcommand\kip{\unit{kip}} % kilopound in "freedom" units - edit made by Sri % % Mass \newcommand\gram{\unit{g}} \newcommand\g{\gram} \newcommand\kilogram{\unit{kg}} \newcommand\kg{\kilogram} \newcommand\grain{\unit{grain}} \newcommand\ounce{\unit{oz}} % % Temperature \newcommand\kelvin{\unit{K}} \newcommand\K{\kelvin} \newcommand\celsius{\unit{{}^\circ C}} \newcommand\C{\celsius} \newcommand\fahrenheit{\unit{{}^\circ F}} \newcommand\F{\fahrenheit} % % Area \newcommand\sqft{\unit{sq\,\foot}} % square foot % % Volume \newcommand\liter{\unit{L}} \newcommand\gallon{\unit{gal}} % % Frequency \newcommand\hertz{\unit{Hz}} \newcommand\rpm{\unit{rpm}} % % Voltage \newcommand\volt{\unit{V}} \newcommand\V{\volt} \newcommand\millivolt{\milli\volt} \newcommand\mV{\milli\volt} \newcommand\kilovolt{\kilo\volt} \newcommand\kV{\kilo\volt} % % Current \newcommand\ampere{\unit{A}} \newcommand\A{\ampere} \newcommand\milliampereA{\milli\ampere} \newcommand\mA{\milli\ampere} \newcommand\kiloampereA{\kilo\ampere} \newcommand\kA{\kilo\ampere} % % Resistance \newcommand\ohm{\Omega} \newcommand\milliohm{\milli\ohm} \newcommand\kiloohm{\kilo\ohm} % correct SI spelling \newcommand\kilohm{\kilo\ohm} % "American" spelling used in siunitx \newcommand\megaohm{\mega\ohm} % correct SI spelling \newcommand\megohm{\mega\ohm} % "American" spelling used in siunitx % % Capacitance \newcommand\farad{\unit{F}} \newcommand\F{\farad} \newcommand\microfarad{\micro\farad} \newcommand\muF{\micro\farad} % % Inductance \newcommand\henry{\unit{H}} \newcommand\H{\henry} \newcommand\millihenry{\milli\henry} \newcommand\mH{\milli\henry} % % Power \newcommand\watt{\unit{W}} \newcommand\W{\watt} \newcommand\milliwatt{\milli\watt} \newcommand\mW{\milli\watt} \newcommand\kilowatt{\kilo\watt} \newcommand\kW{\kilo\watt} % % Energy \newcommand\joule{\unit{J}} \newcommand\J{\joule} % % Composite units % % Torque \newcommand\ozin{\unit{\ounce}\,\unit{in}} \newcommand\newtonmeter{\unit{\newton\,\meter}} % % Pressure \newcommand\psf{\unit{psf}} % pounds per square foot \newcommand\pcf{\unit{pcf}} % pounds per cubic foot \newcommand\pascal{\unit{Pa}} \newcommand\Pa{\pascal} \newcommand\ksi{\unit{ksi}} % kilopound per square inch % NOTE: do NOT define \bar -- it is the built-in LaTeX accent used by \bar{x}, % \bar{y} (sample means). Redefining it made those render as the word "bar". \newcommand\barunit{\unit{bar}} \end{aligned}\end{align} \]

Nov 16, 2026 | 849 words | 8 min read

7.1.1. PCMs: Computer Operations and Logic#

These pre-class materials introduce how computers physically process information, store data, and perform calculations.

In engineering, understanding how a computer operates at the hardware level helps you structure your code and manage your files properly. In this module, you will learn how transistors act as logical switches, how data is encoded into bits, and how to correctly submit your digital files for this course.

How Computers Work: Hardware and Data Storage#

How Computers Operate: Logic Gates and Binary Operations#

What is a Computer?#

A computer is a machine that can store information and be programmed to automatically carry out sequences of arithmetic or logical operations.

To accomplish this, computers rely on four primary components:

  1. Memory: Microchips that store data.

  2. Computation Hardware: Microprocessors that perform the arithmetic and logical operations.

  3. Input Devices: Hardware used to receive information.

  4. Output Devices: Hardware used to present the results of the computation.

Evolution of Computing Hardware#

To understand how modern computers operate, it is helpful to look at how computer hardware has evolved. Early computers relied on different physical methods to create the on and off switches required for computation.

  • Mechanical Relays (1930s): Early computers, such as the Model K built in 1937, used mechanical relays and scrap materials to perform simple binary addition. Because these relays required physical movement to close a switch, they suffered from material failure over time and were typically built to accomplish only a single specific task.

  • Vacuum Tubes (1940s): Engineers replaced mechanical switches with vacuum tubes (similar to light bulbs) that could turn on and off using a small amount of energy without moving parts. The ENIAC was the world’s first electronic programmable computer. It weighed 30 tons and consumed massive amounts of energy, with most power lost as heat. The tubes burned out frequently and could not be scaled down in size.

  • Silicon Semiconductors (Modern): Modern computers use microscopic transistors made from semiconductor materials like silicon. These modern transistors have no moving parts, last significantly longer, and can be scaled down to fit billions of switches onto a single computer chip.

Transistors and Data Storage#

At the lowest physical level, a computer chip is composed of billions of transistors made from semiconductor materials like silicon.

Transistors act as microscopic on and off switches. A computer operates by changing the specific path that electricity takes through these transistors.

Bits and Bytes#

Digital files are saved to a specific physical location on a computer chip. Data is recorded based on the state of the transistors:

  • Bit: A single transistor state. “On” represents a 1, and “off” represents a 0.

  • Byte: A grouping of eight (8) bits.

Because a single byte contains eight distinct bits, it can store 256 different values (\(2^8 = 256\)). Examples of these values include:

  • 00000000 = 0

  • 00000001 = \(2^0 = 1\)

  • 00000010 = \(2^1 = 2\)

  • 01010101 = \(2^6 + 2^4 + 2^2 + 2^ 0 = 64 + 16 + 4 + 1 = 85\)

Computers use these binary values to encode all types of data, mapping numbers to text characters (using ASCII), pixel colors for images, and sampled sound wave amplitudes for audio.

Course File Management and Submission#

Because all digital files are saved to physical locations composed of transistors, you must manage your files carefully. Operating systems use visual folders to help you organize these locations.

When completing assignments for ENGR 131, you must follow strict file submission standards:

  • Save Locally: You must save your work to a specific folder on your local hard drive (such as an “Engineering 131” folder on your Desktop).

  • No Cloud Links: Do not submit links to online folders or cloud-hosted files (like OneDrive or Google Docs).

  • Submit the Exact File: You must upload the actual file containing the physical 1s and 0s directly to Gradescope.

  • Verify Submission: Always download and open your submitted file from the Gradescope confirmation screen to verify you uploaded the correct document.

Logic Gates and Operations#

To perform operations and math, transistors are wired together into specific patterns called logic gates. These gates take one or more binary inputs and produce a specific binary output based on logical rules.

The four primary logic gates are:

  • AND Gate: Outputs a 1 only if both inputs are 1.

  • OR Gate: Outputs a 1 as long as at least one input is a 1.

  • XOR (Exclusive OR) Gate: Outputs a 1 if one and only one input is a 1.

  • NAND Gate: Outputs a 1 as long as both inputs are not 1.

By connecting these gates in parallel and series, computers can add binary numbers together, perform linear algebra, and execute complex programming commands. Programming a computer is simply the act of telling the system which path the energy should take through these logical operations.

Because adding even small binary numbers requires wiring multiple logic gates together, modern computers rely on billions of microscopic transistors to process complex calculations, a concept you will explore further during your in-class activities.

Simulating Logic in Excel#

Engineers can simulate the behavior of physical transistors using software tools. Excel features built-in logical operators such as =AND(), =OR(), and =XOR().

Unlike physical computer hardware that outputs 1s and 0s, Excel’s logical operators report outputs as either TRUE or FALSE. To convert these text outputs into binary numerical values, you must wrap the logical operator in an =IF() function. The =IF() function can be programmed to report a 1 if the logical operator is true, and a 0 if the logical operator is false.