Computer basics Flashcards

1
Q

What is a byte and how many digits does it contain?

Address

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is a compiler? What is an interpreter?

Which runs faster?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Can one interpreter or compiler be used for all languages?

A

No, a different compiler or interpreter is used for each type of language or computer system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is bytecode? What is it used for?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What machine translates bytecode to machine-language?

A

An interpreter called the Java Virtual Machine, it is different for each computer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Give the 4 important factors of an algorithm

A

Well ordered
Finite - It has its limits/an end.
Unambiguous - The instructions must be specific/precise.
Doable - The system can carry out the instructions

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

When and by who was Java created?

When was it released to the public?

A

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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What was Java originally called?

A

Oak

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Give two advantages of Java

A

1) Portability - It can be run on any computer without needing to be recompiled.
2) Platform independence

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What was Java’s original purpose and what is its present purpose?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Which is a higher programming language, Java or Python? why?

A

Python

Some python statements require multiple Java statements to carry out the same function.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Why is Java not as fast as other programming languages?

A

The additional step of translating bytecode, slows it down.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the relationship between objects and methods?

A

Java uses objects (e.g. System.out) to perform actions and those actions are defined by methods (e.g. println).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Define an argument

A

The item(s) inside a parentheses

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Define a data type.

Give two examples

A

It specifies a set of possible values and the operations defined for those values.
E.g. int, char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Define a variable

A

Something that can store a piece of data