Introduction to Computer Engineering & Digital Logic
From the Computer Engineering curriculum
TL;DR
Computer engineering combines electrical engineering and computer science to design and build computer hardware and software. Digital logic is the fundamental building block of all digital systems, using binary (0s and 1s) to represent and process information. Understanding digital logic helps you see how simple electronic switches can perform complex computations.
1. The Mental Model
Think of computer engineering as designing the brain and nervous system of a machine, while digital logic is like the basic neurons and how they fire (on/off) to send messages. It's all about making physical components do smart things using electricity.
2. The Core Material
What is Computer Engineering?

Photo by Quang Nguyen Vinh on Pexels
Computer engineering is a field that bridges the gap between hardware and software. It's about designing, developing, and optimizing computer systems, which involves everything from tiny microcontrollers to massive supercomputers. You'll learn to design circuit boards, processors, memory systems, and also write the software that makes them run efficiently.
What is Digital Logic?

Photo by Chengxin Zhao on Pexels
Digital logic is the foundation of all modern digital electronics. It's how computers represent and manipulate information using discrete values, typically two states: on (represented as 1 or high voltage) and off (represented as 0 or low voltage). These 0s and 1s are called bits.
Logic Gates: The Building Blocks

Photo by Ann H on Pexels
Logic gates are elementary circuits that perform a basic logical operation on one or more binary inputs and produce a single binary output. They are the fundamental components of digital systems.
Here are the most common logic gates:
- AND Gate: Output is 1 only if all inputs are 1.
- OR Gate: Output is 1 if any input is 1.
- NOT Gate (Inverter): Output is the opposite of the input (0 if input is 1, and 1 if input is 0).
- NAND Gate: NOT AND (output is 0 only if all inputs are 1).
- NOR Gate: NOT OR (output is 1 only if all inputs are 0).
- XOR Gate (Exclusive OR): Output is 1 if inputs are different.
- XNOR Gate (Exclusive NOR): Output is 1 if inputs are the same.
Each gate has a specific symbol and a truth table that defines its output for all possible input combinations.
graph TD
A["Electrical Engineering Principles (Circuits, Signals)"] --> CE["Computer Engineering"]
CS["Computer Science Principles (Algorithms, Software)"] --> CE
CE --> DL["Digital Logic Design"]
DL --> H["Hardware Design (Processors, Memory)"]
DL --> S["Software-Hardware Interface (Firmware)"]
H --> C["Computer Systems (PCs, Phones, IoT)"]
S --> C
Boolean Algebra

Photo by Syirwan Ainu on Pexels
Boolean algebra is a mathematical system used to analyze and simplify digital circuits. It uses variables that can only have two values (true/false or 1/0) and operators that correspond to logic gates (AND, OR, NOT). For example, if A and B are inputs:
* A AND B is written as A · B or AB
* A OR B is written as A + B
* NOT A is written as A' or $\bar{A}$
Using Boolean algebra, you can describe the behavior of complex circuits and then simplify them to use fewer gates, saving power and space.
3. Worked Example
Let's design a simple circuit using logic gates for a security light that turns on if it's dark and motion is detected, OR if a manual override switch is on.
Inputs:
* D: Dark sensor (1 if dark, 0 if light)
* M: Motion sensor (1 if motion, 0 if no motion)
* O: Override switch (1 if on, 0 if off)
Output:
* L: Light (1 if on, 0 if off)
Logic: The light L should turn on if (D AND M) OR O.
Boolean Expression: L = (D · M) + O
Let's say:
* It's dark (D = 1)
* Motion is detected (M = 1)
* Override switch is off (O = 0)
- First, evaluate the
D · Mpart:1 · 1 = 1 - Then, evaluate the
(D · M) + Opart:1 + 0 = 1
So, L = 1, meaning the light turns on.
What if:
* It's light (D = 0)
* No motion (M = 0)
* Override switch is on (O = 1)
- Evaluate
D · M:0 · 0 = 0 - Evaluate
(D · M) + O:0 + 1 = 1
Again, L = 1, the light turns on due to the override.
4. Key Takeaways
- Computer engineering combines hardware and software design, focusing on how computers are built and how they operate.
- Digital logic uses binary (0s and 1s) to represent all information within digital systems.
- Logic gates are the fundamental electronic circuits that perform basic logical operations like AND, OR, and NOT.
- Truth tables define the output of a logic gate for all possible input combinations.
- Boolean algebra is a mathematical tool used to describe, analyze, and simplify digital circuits.
- Understanding digital logic is crucial for designing everything from simple alarm systems to complex microprocessors.
- Complex digital systems are built by combining many simple logic gates.
Common Mistakes to Avoid:
- Confusing AND and OR logic: Remember AND needs all inputs true, OR needs at least one input true.
- Misinterpreting NOT: It always flips the state (0 becomes 1, 1 becomes 0).
- Not understanding the relationship between Boolean expressions and circuit diagrams; they represent the same thing.
- Forgetting that everything in digital logic boils down to just two states: on/off, high/low, 1/0.
5. Now Try It
Draw the circuit diagram for the security light example from Section 3 using AND and OR gate symbols. Label your inputs (D, M, O) and output (L). Then, create a full truth table for the expression L = (D · M) + O with all 8 possible combinations of D, M, and O inputs, and show the resulting L output for each.
Frequently asked about Introduction to Computer Engineering & Digital Logic
Study this next
Get the full Computer Engineering curriculum
Clone the complete plan to your dashboard for unlimited AI-generated notes, practice quizzes, and a personalised revision schedule.
Save this course free