Anatomy and Function of Computer

30 terms by Lexiealoha 

Create a new folder

Advertisement Upgrade to remove ads

Central Processing Unit

CPU

Program control, arithmetic, data movement

CPU

locates and executes program instructions

CPU

Millions of transistors

CPU

Has RAM, ROM and Secondary Storage

Memory

Random Access Memory (Read and write memory)

RAM

Read Only Memory (contains certain program that must always be present)

ROM

The hard drive (provides persistent storage)

Secondary Storage

Set of electrical lines that connect CPU, RAM, slots and other connectors

Bus

Holds CPU, memory, bus, card slots

Motherboard

Includes display, printer, mouse, keyboard, speakers, modem

Peripherals

allow computer to talk to other devices (central data storage, printer, other comps)

Networks

Extremely primitive, encoded as numbers, thousands of instructions

Machine Instructions

use computer to translate, assigns short names to commands, makes reading easier, translated into machine instructions, processor dependent

Assembler

Easiest to read and write, translated by compilers into machine instructions,, independent of underlying hardware

Higher Level Languages

#include <iostream>
using namespace std;
int main()
{
cout << "Hello, World!\n";
return 0;
}

Compile a Simple Program

main function

int main ()

end of main function (0 signals successful program run)

return

escape character

\

stdout object

cout

send to operator

<<

faulty input, not quite legal C++, compiler finds errors

syntax errors

program doesn't do what its supposed to do and harder to find

Logic or Run-time Error

result is outside computer's numeric range

Overflow and Roundoff Errors

Validating program correctness, important

Testing

find source of error

Debugging

crafting programs to limit, minimize, localize errors

defensive programming

shield user from compilation details (enter code in window, click button to compile, click another to run)

Integrated Desktop Environments

Compiler translates your C++ source into object code, linker takes object files and code from various libraries, outputs as executable file, libraries contain translated code

Compilation Process

unambiguous, executable, and terminating

Algorithms

Please allow access to your computer’s microphone to use Voice Recording.

Having trouble? Click here for help.

We can’t access your microphone!

Click the icon above to update your browser permissions above and try again

Example:

Reload the page to try again!

Reload

Press Cmd-0 to reset your zoom

Press Ctrl-0 to reset your zoom

It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

Please upgrade Flash or install Chrome
to use Voice Recording.

For more help, see our troubleshooting page.

Your microphone is muted

For help fixing this issue, see this FAQ.

Star this term

You can study starred terms together

NEW! Voice Recording

Create Set