Computer basics Flashcards
What is a byte and how many digits does it contain?
Address
Byte - The smallest addressable unit of memory. It consists of 8 digits, each of which is either 0 or 1.
Address - The number of a byte
What is a compiler? What is an interpreter?
Which runs faster?
A compiler translates from a high-level language (easy for humans to understand) to a low-level language (easy for machines to understand when some minor translation is done).
An interpreter executes a portion of code right after translating it, rather than translating the entire program at once.
A compiled program is faster
Can one interpreter or compiler be used for all languages?
No, a different compiler or interpreter is used for each type of language or computer system.
What is bytecode? What is it used for?
It is the machine language for a hypothetical computer, known as a virtual machine. It is easily translated into the machine language of any computer.
What machine translates bytecode to machine-language?
An interpreter called the Java Virtual Machine, it is different for each computer.
Give the 4 important factors of an algorithm
Well ordered
Finite - It has its limits/an end.
Unambiguous - The instructions must be specific/precise.
Doable - The system can carry out the instructions
When and by who was Java created?
When was it released to the public?
Java was created by James Gosling and his team at Sun Microsystems (Oracle) in 1991.
It was released to the public in 1995 and it has been free since 2007. (first free language)
What was Java originally called?
Oak
Give two advantages of Java
1) Portability - It can be run on any computer without needing to be recompiled.
2) Platform independence
What was Java’s original purpose and what is its present purpose?
It was originally created for embedded systems (e.g. Microwave, thermostat, car) and is now used mainly for running stuff on the internet and android phones.
Which is a higher programming language, Java or Python? why?
Python
Some python statements require multiple Java statements to carry out the same function.
Why is Java not as fast as other programming languages?
The additional step of translating bytecode, slows it down.
What is the relationship between objects and methods?
Java uses objects (e.g. System.out) to perform actions and those actions are defined by methods (e.g. println).
Define an argument
The item(s) inside a parentheses
Define a data type.
Give two examples
It specifies a set of possible values and the operations defined for those values.
E.g. int, char