CS Flashcards
(46 cards)
what does the processor (CPU) do?
it carries out the instructions of a program, to preform the basic operations of the system.
what is the brains of the computer
processor
what does ALU stand for
arithmetic and logic unit
what does the ALU do
it preforms all the calculations and logical operations like AND, OR
what is the processor made up of
ALU, control unit, and registers
what does the controll unit do
the control unit controls the sequencing of fetching, decoding and execution of instructions
what are the registers
the registers are temporary memory locations within the processor itself
what is memory
memory is a set of chips which store programs and data in the computer
what is the purpose of unique addresses
so that the computer can read and write the data to that location correctly
what are the two types of busses
the address bus and the data bus
what does the address bus do
it identidies the memory location that is going to be accessed.
what does the data bus do
the data bus transfer data from the processor to the memory and vice versa.
what are common features of high level languages
it uses english like words, it has to be translated to machine code, it can work on different types of computer systems with only minor changes
what are common features of machine code
it is made up of 1s and 0s, it is machine specific. a machine code program will only run on the type of computer it was created for NOT others
what does a translater do
it translates the high level language to machine code
what are the two types of translaters
interpreter and compiler
what does an interpreter do
an interpreter translates the high level program one line at a time into machine code and executes this line immediately. becuase you cant save the machine code this translation must be carried out every time the program is run hence it takes a long time
what are two advantages of an interpreter
it reports errors at the end of each line so it is easier to correct mistakes and it takes less memory than a compiler when translating the program into machine code
what is the disadvantages of an interpreter
becuase the machine code cannot be saved the high level language needs to be translated into machine code every time the program is run. this takes time
what does a compiler do
a compiler translates the whole high language code into machine code and saves the machine code version of the program meaning it can be run in future without having to translate it again. this saves time
what are two advantages of a compiler
because the machine code file is saved, it never needs to be translated again and it takes less memory when executing the mahine code program to an interpreter
what are the disadvantages of a compiler
it takes more memory when translating the program compared to an interpreter
when do programmers use interpreters
when they are developing the program
why do programmers use interpreters when developing a program
because each error is reported at the end of each line so debugging mistakes is easier