Chapter 1 Flashcards
(44 cards)
What is a program?
Is a set of instruction a computer follows to perform a task, commonly referred as software.
What is a programmer?
Person with the skills to design, create and test programs
Hardware?
Refers to the physical devices, or components, the a computer is made of. A computer is a system of devices that all work together
What are the components of a typical computer system?
Central processing unit (CPU) Main memory (RAM) Secondary storage devices Input devices Output devices
CPU
When a computer is performing the task that a program tells it to do, we say the computer is running or executing the program. The central processing unit, is the part of a computer that actually runs the programs. CPU is the most important part because without it it can not run programs. Nowadays also know as microprocessor
What is the main memory?
Think of it as the computers works area. This were the computer stores the program while is running, as well as the data that the program is working with. Commonly known as random access memory (RAM). It’s called this because the CPU is able to quickly access data store at any random location in RAM.
Secondary storage device?
Is a type of memory that can hold data for long periods of time, even when there is no power to the computer. Programs are normally store in secondary memory and loaded loaded into main memory as needed. Most common is a disk drive
Disk drives?
Stores data by magnetically encoding into a circular disk
USB drives
Small devices that plugs into the computer USB (Universal Serial Bus) port and appears to the system as a disk drive.
Optical drives
Such as CD and DVD are also use for data storage. These do not encode information magnetically, but is encoded as a series of pits on the disc surface. A laser is use to detect the pits and thus read the encoded data.
Input devices
Input Is any data the computer collects from people and from other devices. The component that collects the data and sends it to the computer is called input device
Output devices
Output Is any data that the computer produces for people or for other devices. The data is sent to an output device which formats and presents it.
How computers store values?
Concept: All data that is store in a computer is converted to sequences of 0s and 1s. Computers memory is divided into tiny storage locations knows as bytes. One byte is only enough memory to store a letter or a small number Each byte is divide into eight smaller locations know as bits. Bits stand for binary digits. Bits are tiny electrical components that can hold either a positive or negative charge.
How computers store number?
A bit can be use in a very limited way to represent numbers. Depending on whether the bit is turn on and off, it can be present one of two different values. In computer systems, a bit that is turn off represents the number zero in a bit that is turn on represents the number one. This corresponds perfectly to the binary number system. The position of each digits in the binary number has a value assign to it starting with the right most digit

Number values of Binary code when storing numbers

What happens when you reach the limits of a byte?
The values on one byte can only hold the numbers up to 255. When a number is bigger than 255, the computer puts together two bytes and that gives us 2¹⁵ which translate into values up to 65,535
Storing characters
Any data must be store in a memory as a binary number. When a character is stored in memory, it is first converted to a numeric code. The numeric code is then store stored as a binary number
ASCII
American Standard Code for Information Interchange. Is one of the most important coding schemes. It is a set of 128 numeric codes that represents the English letters, various punctuation marks, and other characters.
Unicode
Is an extensive coding scheme that was created in 1990’s due to the limitations of ASCII which only had 128 English characters. Unicode is an extensive encoding scheme that it is compatible with ASCII, and can also represents the characters of many of the world’s languages.
Advance number system
To stored negative and real number in the memory such as 3.147. The computer uses other techniques, for negative number the computer uses the two’s compliment, and real number are encoded in floating-point notation
Other types of data
Computers are referred to as digital device. The term digital is any device that work in binary data. Pictures are compose of tiny dots called pixels. (the term pixel stands for picture element) images are converted to a numeric code that represents the pixel’s color. The numeric code is stored in memory as a binary number. Music is broken into small pieces called samples, each sample is converted into binary number, which can be store in the memory.
How programs work?
CPU performs simple operations on pieces of data. The CPU does nothing on its own, however. It has to be told what to do, that is the purpose of the program. A machine language instructions exists for each operation that a CPU is capable of performing. The entire set of instructions that a CPU can execute is known as the CPU’s “instructions set”
Where do programs stores?
Programs are store in the secondary memory and each time that the program need to be executed is copied to the main memory, so that the CPU can execute the program from the main memory.
Fetch-decode-execute cycle
When CPU executes the instructions in a program runs this cycle for each instruction.