目錄
Preface
1 Welcome Aboard
1.1 What We Will Tryto Do
1.2 How We Will Get There
1.3 Two Recurring Themes
1.3.1 The Notion of Abstraction
1.3.2 Hardware vs. Software
1.4 A Computer System
1.4.1 A (Very) Little History for a(Lot) Better Perspective
1.4.2 The Parts of a Computer System
1.5 Two Very Important Ideas
1.6 Computersas Universal Computational Devices
1.7 How Do We Getthe Electrons to Do the Work?
1.7.1 The Statement of the Problem
1.7.2 The Algorithm
1.7.3 The Program
1.7.4 The ISA
1.7.5 The Microarchitecture
1.7.6 The Logic Circuit
1.7.7 The Devices
Exercises
2 Bits, Data Types, and Operations
2.1 Bits and Data Types
2.1.1 The Bitas the Unit of Information
2.1.2 Data Types
2.2 Integer Data Types
2.2.1 Unsigned Integers
2.2.2 Signed Integers
2.3 2』s Complement Integers
2.4 Conversion Between Binary and Decimal
2.4.1 Binary to Decimal Conversion
2.4.2 Decimal to Binary Conversion
2.4.3 Extending Conversion to Numbers with Fractional Parts
2.5 Operations on Bits—Part I: Arithmetic
2.5.1 Addition and Subtraction
2.5.2 Sign-Extension
2.5.3 Overflow
2.6 Operations on Bits—Part II:Logical Operations
2.6.1 ALogical Variable
2.6.2 The AND Function
2.6.3 The OR Function
2.6.4 The NOT Function
2.6.5 The Exclusive-OR Function
2.6.6 De Morgan』s Laws
2.6.7 The Bit Vector
2.7 Other Representations
2.7.1 Floating Point Data Type (Greater Range, Less Precision)
2.7.2 ASCII Codes
2.7.3 Hexadecimal Notation
Exercises
3 Digital Logic Structures
3.1 The Transistor
3.2 Logic Gates
3.2.1 The NOT Gate (Inverter)
3.2.2 OR and NOR Gates
3.2.3 Why We Can』t Simply Connect P-Type to Ground
3.2.4 AND and NAND Gates
3.2.5 Gates with More Than Two Inputs
3.3 Combinational Logic Circuits
3.3.1 Decoder
3.3.2 Mux
3.3.3 A One-Bit Adder (a.k.a.a Full Adder)
……
4 The von Neumann Model
5 The LC
6 PrOgramminq
7 Assembly Language
8 Data Structures
9 I
10 A Calculator
11 Introduction to C/C++ Programming
12 Variables and Operators
13 Control Structures
14 Functions
15 Testing and Debugging
16 Pointers and Arrays
17 Recursion
18 I/O in C
19 Dynamic Data Structures in C
20 I ntrod uction to C
A The LC-3 lSA
B From LC-3 to x
C The MiCrOarchitecture Of the LC-
D The C PrOgramming Language
E UsefuI Tables
F Solutions to Selected Exercises