did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780072376906

Introduction to Computing Systems: From Bits and Gates to C and Beyond

by ;
  • ISBN13:

    9780072376906

  • ISBN10:

    0072376902

  • Edition: 1st
  • Format: Hardcover
  • Copyright: 2000-09-01
  • Publisher: MCG
  • View Upgraded Edition
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $71.00

Summary

The reason most people do not understand their first programming language is because they are forced to memorize technical details. They do not understand the basic underpinnings. This book is based on the premise that starting with a high-level programming language has its shortcomings. This premise lead to Patt/Patel's "bottom-up approach" found in Introduction in Computing.

Table of Contents

Welcome Abroad
1(16)
What We Will Try To Do
1(1)
How We Will Get There
2(1)
A Computer System
3(2)
Two Very Important Ideas
5(1)
Computers as Universal Computational Devices
6(2)
How Do We Get the Electrons to Do the Work?
8(9)
The Statement of the Problem
9(1)
The Algorithm
10(1)
The Program
10(1)
The ISA
11(1)
The Micoarchitecture
12(1)
The Logic Circuit
12(1)
The Devices
13(1)
Putting It Together
13(1)
Problems
13(4)
Bits, Data Types, and Operations
17(30)
Bits and Data Types
17(2)
The Bit as the Unit of Information
17(1)
Data Types
18(1)
Integer Data Types
19(2)
Unsigned Integers
19(1)
Singed Integers
19(2)
2's Complement Integers
21(2)
Binary-Decimal Conversion
23(2)
Binary to Decimal Conversion
23(1)
Decimal to Binary Conversion
24(1)
Operations on Bits---Part I: Arithmetic
25(4)
Addition and Subtraction
25(1)
Sign-extension
26(1)
Overflow
27(2)
Operations on Bits---Part II: Logical Operations
29(3)
The AND Function
29(1)
The OR Function
30(1)
The NOT Function
30(1)
The Exclusive-OR Function
31(1)
Examples
31(1)
Other Representations
32(15)
Floating Point Data Type
32(4)
ASCII Codes
36(1)
Hexadecimal Notation
36(2)
Problems
38(9)
Digital Logic Structures
47(28)
The Transistor
47(2)
Logic Gates
49(6)
The NOT Gate (or, Inverter)
49(1)
OR and NOR Gates
50(2)
AND and NAND Gates
52(2)
DeMorgan's Law
54(1)
Larger Gates
55(1)
Combinational Logic Structures
55(5)
Decoder
56(1)
Mux
56(1)
Full Adder Circuit
57(3)
Logical Completeness
60(1)
Basic Storage Elements
60(4)
The R-S Latch
61(1)
The Gated D Latch
62(1)
A Register
62(2)
The Concept of Memory
64(3)
Address Space
64(1)
Addressability
64(1)
A 22-by-3-bit Memory
65(2)
The Data Path of the LC-2
67(8)
Problem
68(7)
The Von Neumann Model
75(16)
Basic Components
75(4)
Memory
75(2)
Processing Unit
77(1)
Input and Output
78(1)
Control Unit
78(1)
Summary: The LC-2 as an Example of the Von Neumann Model
79(1)
Instruction Processing
79(5)
The Instruction
80(2)
The Instruction Cycle
82(2)
Examples
84(1)
Changing the Sequence of Execution
84(1)
Stopping the Computer
85(6)
Problems
87(4)
The LC-2
91(28)
The ISA: Overview
91(4)
Memory Organization
92(1)
Registers
92(1)
The Instruction Set
93(1)
Opcodes
93(1)
Data Types
93(2)
Addressing Modes
95(1)
Condition Codes
95(1)
Operate Instructions
95(2)
Data Movement Instructions
97(4)
Immediate Mode
98(1)
Direct Mode
98(1)
Indirect Mode
99(1)
Base+Offset Mode
99(1)
An Example
99(2)
Control Instructions
101(6)
Conditional Branches
101(1)
An Example
102(2)
Two Methods for Loop Control
104(1)
Example: Adding a Column of Numbers Using a Sentinel
105(1)
The TRAP Instruction
106(1)
Another Example: Counting Occurrences of a Character
107(3)
The Data Path Revisited
110(9)
Basic Components of the Data Path
110(3)
The Instruction Cycle
113(1)
Problems
114(5)
Programming
119(20)
Problem Solving
119(8)
Systematic Decomposition
119(1)
The Three Constructs: Sequential, Conditional, Iterative
120(1)
LC-2 Control Instructions to Implement the Three Constructs
121(2)
The Character Count Example from Chapter 5, Revisited
123(4)
Debugging
127(12)
Debugging Operations
127(1)
Examples: Use of the Interactive Debugger
128(7)
Problems
135(4)
Assembly Language
139(18)
Assembly Language Programming---Moving Up a Level
139(1)
An Assembly Language Program
140(7)
Instructions
141(3)
Pseudo-ops (Assembler Directives)
144(1)
Example: The Character Count Example of Section 5.5, Revisited
145(2)
The Assembly Process
147(2)
Introduction
147(1)
A Two-Pass Process
147(1)
The First Pass: Creating the Symbol Table
148(1)
The Second Pass: Generating the Machine Language Program
149(1)
Beyond Assembly of a Single Assembly Language Program
149(8)
The Executable Image
150(1)
More than One Object File
151(1)
Problems
151(6)
I/O
157(14)
I/O Basics
157(3)
Device Registers
157(1)
Memory-Mapped I/O Versus Special Input/Output Instructions
158(1)
Asynchronous Versus Synchronous
158(2)
Interrupt-Driven Versus Polling
160(1)
Input from the Keyboard
160(2)
Basic Input Registers (the KBDR and the KBSR)
160(1)
The Basic Input Service Routine
160(2)
Output to the Monitor
162(1)
Basic Output Registers (the CRTDR and the CRTSR)
162(1)
The Basic Output Service Routine
162(1)
Example: Keyboard Echo
163(1)
A More Sophisticated Input Routine
163(2)
Interrupt-Driven I/O
165(6)
The Interrupt Signal
166(1)
The Test for Interrupts
167(1)
Problems
167(4)
TRAP Routines and Subroutines
171(24)
LC-2 TRAP Routines
171(10)
Introduction
171(1)
The TRAP Mechanism
172(1)
The TRAP Instruction
173(1)
The RET Instruction
174(2)
An Example
176(1)
TRAP Routines for Handling I/O
177(2)
TRAP Routine for Halting the Computer
179(1)
Saving and Restoring Registers
179(2)
Subroutine Calls/Returns
181(14)
The JSR/RET Mechanism
182(1)
The JSR and JSRR Instructions
183(1)
An Example
184(2)
Another Subroutine; Writing a Character String to the Monitor
186(1)
Library Routines
187(5)
Problems
192(3)
And, Finally
195(28)
The Stack---A Very Important Storage Structure
195(6)
The Stack---An Abstract Data Type
195(1)
Two Example Implementations
196(1)
Implementation in Memory
197(4)
The Complete Picture
201(1)
Arithmetic Using a Stack
201(9)
The Stack as Temporary Storage
201(2)
An Example
203(1)
OpAdd, OpMult, and OpNeg
203(7)
Data Type Conversion
210(5)
Example: The Bogus Program: 2 + 3 = e
210(1)
ASCII to Binary
211(3)
Binary to ASCII
214(1)
Our Final Example: The Calculator
215(8)
Problems
221(2)
Introduction to Programming in C
223(18)
Our Objective
223(1)
Bridging the Gap
224(2)
Translating High-Level Language Programs
226(1)
Interpretation
226(1)
Compilation
227(1)
Pros and Cons
227(1)
The C Programming Language
227(3)
The C Compiler
228(2)
A Simple Example
230(11)
The Function main
232(1)
Formatting, Comments, and Style
233(1)
The C Preprocessor
233(2)
Input and Output
235(3)
Problems
238(3)
Variables and Operators
241(34)
Introduction
241(1)
Variables
241(13)
Three Basic Data Types: int, char, double
243(3)
Identifiers
246(1)
Scope: Globals and Locals
247(2)
More Examples
249(1)
Symbol Table
250(1)
Allocating Space for Variables
250(3)
Literals, Constants, and Symbolic Values
253(1)
Operators
254(14)
Expressions and Statements
255(1)
The Assignment Operator
256(1)
Arithmetic Operators
257(1)
Precedence and Associativity
258(1)
Bitwise Operators
259(1)
Logical Operators
260(2)
Relational Operators
262(1)
A Simple Example
263(1)
C's Special Operators
263(4)
Tying It Together
267(1)
A More Comprehensive Example
268(2)
Summary
270(5)
Problems
271(4)
Control Structures
275(36)
Conditional Constructs
276(9)
The if Statement
276(2)
The if-else-Statement
278(4)
The switch Statement
282(2)
An Example Program
284(1)
Interation Constructs
285(10)
The while Statement
286(2)
The for Statement
288(4)
The do-while Statement
292(2)
The break and continue Statements
294(1)
Completing the Picture; C Syntax
295(1)
Declarations
295(1)
Statements
296(1)
Problem Solving Using C
296(15)
Approximating the Value of π
296(2)
Finding Prime Numbers Less than 100
298(3)
Detecting a Sequence of Text
301(3)
Problems
304(7)
Functions
311(24)
Introduction
311(1)
High-level Programming Structure
312(1)
Functions in C
313(4)
The Declaration
315(1)
The Call
316(1)
The Definition
316(1)
The Return Value
316(1)
Another Example
317(1)
The Run-time Stack
317(5)
The Activation Record
318(2)
Activation Records During Execution
320(2)
Implementing Functions in C
322(5)
The Call
323(1)
Starting the Callee Function
324(1)
Ending the Callee Function
325(1)
Returning to the Caller Function
325(1)
Tying It All Together
326(1)
Problem Solving: Case Conversion
327(8)
Problems
330(5)
Debugging
335(12)
Introduction
335(1)
Types of Errors
336(3)
Syntactic Errors
336(1)
Semantic Errors
337(2)
Algorithmic Errors
339(1)
Debugging Techniques
339(8)
Ad-hoc Techniques
340(1)
The Source-level Debugger
341(1)
Problems
342(5)
Recursion
347(18)
Introduction
347(1)
What Is Recursion?
348(1)
A High-level Example: Binary Search
349(1)
Towers of Hanoi
350(4)
A Detailed Example in C
354(4)
Another Detailed Example in C
358(7)
Problems
359(6)
Pointers and Arrays
365(28)
Introduction
365(1)
Pointers
366(8)
Declaring Pointer Variables
367(1)
Operators for Pointers
368(2)
Some Examples Using Pointer Variables
370(4)
The Syntax Demystified
374(1)
Arrays
374(19)
Declaring Arrays and Accessing Elements
375(1)
Examples Using Arrays
376(3)
Arrays as Parameters
379(1)
Strings in C
380(3)
The Relationship Between Arrays and Pointers
383(1)
More Examples
384(3)
Common Pitfalls with Arrays in C
387(2)
Problems
389(4)
I/O in C
393(14)
Introduction
393(1)
A Brief Note About the C Standard Library
393(1)
I/O, One Character at a Time
394(3)
putchar
394(1)
getchar
395(1)
Buffered I/O
395(2)
Slightly More Sophisticated I/O
397(5)
printf
397(2)
scanf
399(2)
Variable Argument Lists
401(1)
I/O from Files
402(5)
Problems
404(3)
Data Structures
407(22)
Introduction
407(1)
Structures
408(5)
The Basics of Structures in C
408(3)
Arrays and Pointers with Structures
411(2)
A Foray into Dynamic Allocation
413(3)
The Linked List
416(9)
What Is a Linked List?
416(1)
An Example Using Linked Lists
417(8)
Conclusion
425(4)
Problems
425(4)
Appendix A The LC-2 ISA 429(22)
A.1 Overview
429(1)
A.2 Notation
430(1)
A.3 The Instruction Set
430(21)
Appendix B From LC-2 to IA-32 451(20)
B.1 LC-2 Features and Corresponding IA-32 Features
452(10)
B.1.1 Instruction Set
452(5)
B.1.2 Memory
457(2)
B.1.3 Internal State
459(3)
B.2 The Format and Specification of IA-32 Instructions
462(4)
B.2.1 Prefix
462(1)
B.2.2 Opcode
463(1)
B.2.3 ModR/M Byte
463(1)
B.2.4 SIB Byte
464(1)
B.2.5 Displacement
464(1)
B.2.6 Immediate
465(1)
B.3 An Example
466(5)
Appendix C The Microarchitecture of the LC-2 471(18)
C.1 Overview
471(2)
C.2 The State Machine
473(2)
C.3 The Data Path
475(1)
C.4 The Control Structure
475(6)
C.5 Memory-mapped I/O
481(1)
C.6 Interrupt Control
481(5)
C.6.1 Initiating an Interrupt
482(3)
C.6.2 Returning from an Interrupt, RTI
485(1)
C.7 Control Store
486(3)
Appendix D The C Programming Language 489(24)
D.1 Overview
489(1)
D.2 C Conventions
489(3)
D.2.1 Source Files
489(1)
D.2.2 Header Files
489(1)
D.2.3 Comments
490(1)
D.2.4 Literals
490(2)
D.2.5 Formatting
492(1)
D.2.6 Keywords
492(1)
D.3 Identifiers, Types, and Declarations
492(5)
D.3.1 Identifiers
492(1)
D.3.2 Basic Data Types
493(1)
D.3.3 Type Qualifiers
494(1)
D.3.4 Storage Class
495(1)
D.3.5 Derived Types
495(1)
D.3.6 Structures
496(1)
D.4 Declarations
497(2)
D.4.1 Variable Declarations
497(1)
D.4.2 Function Declarations
498(1)
D.4.3 Typedef
498(1)
D.5 Operators
499(4)
D.5.1 Assignment Operator
499(1)
D.5.2 Arithmetic Operators
500(1)
D.5.3 Bitwise Operators
500(1)
D.5.4 Logical Operators
500(1)
D.5.5 Relational Operators
501(1)
D.5.6 Special Operators
501(1)
D.5.7 Conditional Expression
501(1)
D.5.8 Pointer, Array, Structure Operators
502(1)
D.5.9 Miscellaneous Operators
502(1)
D.5.10 Precedence
502(1)
D.6 Expressions and Statements
503(1)
D.6.1 Expressions
503(1)
D.6.2 Statements
503(1)
D.7 Control Flow
503(6)
D.7.1 If
503(1)
D.7.2 If-else
504(1)
D.7.3 Switch
504(2)
D.7.4 While
506(1)
D.7.5 For
506(1)
D.7.6 Do-while
507(1)
D.7.7 Break
507(1)
D.7.8 Continue
508(1)
D.7.9 Return
508(1)
D.8 Standard Library Functions
509(4)
D.8.1 I/O Functions
509(1)
D.8.2 String Functions
510(1)
D.8.3 Math Functions
511(1)
D.8.4 Utility Functions
511(2)
Appendix E Useful Tables 513(4)
E.1 Conversion Specifications for C I/O
513(1)
E.2 ASCII Codes
514(1)
E.3 Commonly Used Numerical Prefixes
515(2)
Index 517

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program