C++ Programming
Chapter
1: An Overview of Computers and Programming Languages
Before programming, it is useful to
understand terminology and computer components
Elements
of a Computer System
1)Hardware
A) CPU
B) Main
memory
C) Secondary
storage
D) Input/Output
devices
2)Software
//////////////////////////////////////////////////////////////
1.A) CPU (Central Processing Unit)
A.1 CU
(Control Unit):
Fetches
and decodes instructions
Controls
flow of information in and out of MM
Controls
operation of internal CPU components
A.2 PC
(program counter):
points to next instruction to be executed
A.3 IR (instruction register): holds instruction currently being
executed
A.4 ALU (arithmetic logic unit): carries out all arithmetic and logical
operations
///////////////////////////////////////////////////////////
Main
Memory
B.1 Directly
connected to the CPU
B.2 All
programs must be loaded into main memory before they can be executed
B.3 All
data must be brought into main memory before it can be manipulated
B.4 When
computer power is turned off, everything in main memory is lost
///////////////////////////////////////////////////////////
C) Secondary
Storage
Secondary storage: device that stores information
permanently
Examples
of secondary storage:
−Hard
disks
−Flash
drives
−Floppy
disks
−CD-ROMs
///////////////////////////////////////////////////////////
D) Input/Output
Devices
A) Input
devices
they include:
−Keyboard
−Mouse
−Secondary
storage
B) Output
devices
they include:
−Monitor
−Printer
−Secondary
storage
///////////////////////////////////////////////////////////
Software
Software: programs that do specific tasks
System
programs take control of the computer, such as an
operating system
///////////////////////////////////////////////////////////
The
Language
Digital
signals are sequences of 0s and 1s
Machine language: language of a computer
Binary digit (bit):
The
digit 0 or 1
Binary code:
A
sequence of 0s and 1s
Byte:
A
sequence of eight bits
///////////////////////////////////////////////////////
Coding
Schemes
ASCII
(American Standard Code for Information Interchange)
−128
characters
−A is
encoded as 1000001 (66th character)
−3 is
encoded as 0110011
ليست هناك تعليقات:
إرسال تعليق