Chapter 1 Compilersinterpreters Programs must be converted to machine language Compiler converts a program into a separate machine language program That program can then be executed whenever needed ID: 784049
Download The PPT/PDF document "Introduction to computers and programs" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Introduction to computers and programs
Chapter 1
Slide2Compilers/interpreters
Programs must be converted to machine language.
Compiler – converts a program into a separate machine language program. That program can then be executed whenever needed.
Interpreter – translates and executes each instruction as they are read. Do not typically create a separate program.
Java
uses
both
.
Slide3Hardware vs. Software
Hardware – all of the physical devices of components that make up a computer
Software – the programs that run on a computer
Slide4Components
CPU – the component which runs programs. Most important component in the computer.
ENIAC
today’s CPUs
8
ft tall 100 ft long 30 tons small and getting smaller
Slide5CPU
capabilites
Reading data from main memory
Adding two numbers
Subtracting two numbers
Multiplying two numbers
Dividing two numbers
Moving a piece of data from one location to anotherDetermining whether one value is equal to another
Slide6Components
Main Memory – where a computer stores a program while it is running as well as any data the program is working with. Commonly known as RAM (Random Access Memory)
Called RAM because CPU can quickly access data stored at any random location.
Requires electricity.
Slide7Components
Secondary Storage – type of memory that can hold data for long periods of time. Often uses magnetic disks in order to store data. Solid state drives are becoming increasingly popular. They have no moving parts and utilize flash storage.
External storage drives such as disk drives or USB flash drives would also be considered secondary storage
Slide8Input/output
Input – any data the computer collects from people and from other devices.
Input device – any device that collects input such as scanner, keyboards, mouse, camera, disk drives, etc.
Output – any data the
the
computer produces for people or other devices
Output devices – monitor, printer, disk drives, etc.
Slide9Operating system
Most fundamental set of programs on a computer. The operating system controls the internal operations of the computer’s hardware. It allows other programs to run and data to be stored.
Slide10Binary
A computer’s memory is comprised of switches which can be either on or off. (positive or negative charge)
Each switch represents one bit.
8 bits make one byte
Represent the switches with binary. 1 is on and 0 is off.
Slide11Binary conversions
Each place value is 2 to a power:
Try to convert 101101 from binary to decimal
Slide12Programs
CPU understands machine language, which has a binary structure
Assembly Language – used short mnemonics for some commands such as add,
mul
,
mov
…
High Level languages – Programming languages such as we use today: COBOL, BASIC, Pascal, C, C++, Java, PythonUtilize Key Words