ACKNOWLEDGMENTS

INTRODUCTION

Who Is This Book For?

About This Book

About Exercises and Projects

My Computing Journey

1
COMPUTING CONCEPTS

Defining a Computer

Analog and Digital

The Analog Approach

Going Digital

Number Systems

Decimal Numbers

Binary Numbers

Bits and Bytes

Prefixes

Hexadecimal

Summary

2
BINARY IN ACTION

Representing Data Digitally

Digital Text

ASCII

Digital Colors and Images

Approaches for Representing Colors and Images

Interpreting Binary Data

Binary Logic

Summary

3
ELECTRICAL CIRCUITS

Electrical Terms Defined

Electric Charge

Electric Current

Voltage

Resistance

Water Analogy

Ohm’s Law

Circuit Diagrams

Kirchhoff’s Voltage Law

Circuits in the Real World

Light-Emitting Diodes

Summary

Project #1: Build and Measure a Circuit

Project #2: Build a Simple LED Circuit

4
DIGITAL CIRCUITS

What Is a Digital Circuit?

Logic with Mechanical Switches

The Amazing Transistor

Logic Gates

Designing with Logic Gates

Integrated Circuits

Summary

Project #3: Build Logical Operators (AND, OR) with Transistors

Project #4: Construct a Circuit with Logic Gates

5
MATH WITH DIGITAL CIRCUITS

Binary Addition

Half Adders

Full Adders

A 4-bit Adder

Signed Numbers

Unsigned Numbers

Summary

Project #5: Build a Half Adder

6
MEMORY AND CLOCK SIGNALS

Sequential Logic Circuits and Memory

The SR Latch

Using the SR Latch in a Circuit

Clock Signals

JK Flip-Flops

T Flip-Flops

Using a Clock in a 3-Bit Counter

Summary

Project #6: Construct an SR Latch Using NOR Gates

Project #7: Construct a Basic Vending Machine Circuit

Project #8: Add a Delayed Reset to the Vending Machine Circuit

Project #9: Using a Latch as a Manual Clock

Project #10: Test a JK Flip-Flop

Project #11: Construct a 3-bit Counter

7
COMPUTER HARDWARE

Computer Hardware Overview

Main Memory

Central Processing Unit (CPU)

Instruction Set Architectures

CPU Internals

Clock, Cores, and Cache

Beyond Memory and Processor

Secondary Storage

Input/Output

Bus Communication

Summary

8
MACHINE CODE AND ASSEMBLY LANGUAGE

Software Terms Defined

An Example Machine Instruction

Calculating a Factorial in Machine Code

Summary

Project #12: Factorial in Assembly

Project #13: Examining Machine Code

9
HIGH-LEVEL PROGRAMMING

High-Level Programming Overview

Introduction to C and Python

Comments

Variables

Variables in C

Variables in Python

Stack and Heap Memory

The Stack

The Heap

Math

Logic

Bitwise Operators

Boolean Operators

Program Flow

If Statements

Looping

Functions

Defining Functions

Calling Functions

Using Libraries

Object-Oriented Programming

Compiled or Interpreted

Calculating a Factorial in C

Summary

Project #14: Examine Variables

Project #15: Change the Type of Value Referenced by a Variable in Python

Project #16: Stack or Heap

Project #17: Write a Guessing Game

Project #18: Use a Bank Account Class in Python

Project #19: Factorial in C

10
OPERATING SYSTEMS

Programming Without an Operating System

Operating Systems Overview

Operating System Families

Kernel Mode and User Mode

Processes

Threads

Virtual Memory

Application Programming Interface (API)

The User Mode Bubble and System Calls

APIs and System Calls

Operating System Software Libraries

Application Binary Interface

Device Drivers

Filesystems

Services and Daemons

Security

Summary

Project #20: Examine Running Processes

Project #21: Create a Thread and Observe It

Project #22: Examine Virtual Memory

Project #23: Try the Operating System API

Project #24: Observe System Calls

Project #25: Use glibc

Project #26: View Loaded Kernel Modules

Project #27: Examine Storage Devices and Filesystems

Project #28: View Services

11
THE INTERNET

Networking Terms Defined

The Internet Protocol Suite

Link Layer

Internet Layer

Transport Layer

Application Layer

A Trip Through the Internet

Foundational Internet Capabilities

Dynamic Host Configuration Protocol

Private IP Addresses and Network Address Translation

The Domain Name System

Networking Is Computing

Summary

Project #29: Examine the Link Layer

Project #30: Examine the Internet Layer

Project #31: Examine Port Usage

Project #32: Trace the Route to a Host on the Internet

Project #33: See Your Leased IP Address

Project #34: Is Your Device’s IP Public or Private?

Project #35: Find Information in DNS

12
THE WORLD WIDE WEB

Overview of the World Wide Web

The Distributed Web

The Addressable Web

The Linked Web

The Protocols of the Web

The Searchable Web

The Languages of the Web

Structuring the Web with HTML

Styling the Web with CSS

Scripting the Web with JavaScript

Structuring the Web’s Data with JSON and XML

Web Browsers

Rendering a Page

The User Agent String

Web Servers

Summary

Project #36: Examine HTTP Traffic

Project #37: Run Your Own Web Server

Project #38: Return HTML from Your Web Server

Project #39: Add CSS to Your Website

Project #40: Add JavaScript to Your Website

13
MODERN COMPUTING

Apps

Native Apps

Web Apps

Virtualization and Emulation

Virtualization

Emulation

Cloud Computing

The History of Remote Computing

The Categories of Cloud Computing

The Deep Web and Dark Web

Bitcoin

Bitcoin Basics

Bitcoin Wallets

Bitcoin Transactions

Bitcoin Mining

Virtual Reality and Augmented Reality

The Internet of Things

Summary

Project #41: Use Python to Control a Vending Machine Circuit

A
ANSWERS TO EXERCISES

B
RESOURCES

Buying Electronic Components for the Projects

7400 Part Numbers

Shopping

Powering Digital Circuits

USB Charger

Breadboard Power Supply

Power from a Raspberry Pi

AA Batteries

Troubleshooting Circuits

Raspberry Pi

Why Raspberry Pi

Parts Needed

Setting Up a Raspberry Pi

Using Raspberry Pi OS

Working with Files and Folders

INDEX