todo Flashcards

1
Q

Names of logic gates

A
  1. AND gate
  2. NOT gate
  3. OR gate
  4. NOR gate
  5. NAND gate
  6. XOR gate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Binary to denary

A

Add numbers (1,2,4) that have a 1 below them

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

Denary to binary

A

Does 256 fit into _?, Does 128 fit into _? If yes put a 1

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

Binary to hex

A

Split number into groups of 4 and add the ones

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

Hex to binary

A

Convert letters to numbers. Convert each number into binary using base 2

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

Hex to denary

A

Multiply each digit by its value on base 16 and add the results together.

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

Denary to hex

A

Divide each number by 16 and then read the remainder from bottom to top. (convert into letters if needed)

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

Uses of the hexadecimal number system

A
  • HTML and CSS colour codes
  • MAC addresses
  • Assembly code
  • Memory dumps
  • Web addresses
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Uses of binary system

A
  • Computer registers
  • Robotics
  • Counting systems
  • Digital instruments
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Why might programmers prefer to read in hexadecimal rather than in binary?

A

It is easier to fiend errors, binary consists of zeros and ones, hexadecimal takes up less visual space

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

What does the symbol “terminator” do and how does it look?

A

It indicates the START/END of a system. It looks like a rectangle with soft edges.

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

What does the symbol “input/output” do and how does it look?

A

It indicates when INPUT is required from the user if OUTPUT is being sent to the user. It is a parallelogram

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

What does the symbol “process” do and how does it look?

A

It names a process within the system. It. is a rectangle.

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

What does the symbol “data flow line” do and how does it look?

A

It joins to operations, the arrowhead indicating the direction of the flow. It is an arrow.

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

What does the symbol “decision” do and how does it look?

A

It is a point in the sequence where alternative paths can be taken, yes or no. It is a rhombus.

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

What is a string?

A

A string is text, it treats all data as text.

17
Q

What is an integer?

A

An integer is a whole number, you can perform calculations with these.

18
Q

What is a variable?

A

A variable is a piece of data that you can alter that has also been given a name.

19
Q

What is a constant?

A

A named memory location that contains data that can be read but not changed by the program

20
Q

What is a real?

A

Positive or negative fractional values. (“float”)

21
Q

What is a char?

A

A single character or symbol. (“str”)

22
Q

What is a boolean?

A

One of 2 values, true or false (“bool”)

23
Q

Global variables

A

Variables that can be accessed from any routine in the program

24
Q

Local variables

A

Variables that can only be accessed in the code element in which they are declared

25
How do you write to the power of something in python?
**
26
How do you write square root of something in python?
**0.5. or math.sqrt
27
What is sequence?
Sequence is the order in which the instructions are executed.Sequence is the first programming construct.
28
What is selection?
Selection is the second programming construct. Selection is the process of making a decision. The result of the decision decides which path the program will take next.selection is implemented using IF THEN or IF THEN ELSE statements:
29
What is iteration?
Iteration is the third programming construct. There are times when a program needs to repeat certain steps until told otherwise, or until a condition has been met. This process is known as iteration
30
What is a subroutine?
A sequence id program code that performs a specific task but does not represent the entire system. All subroutines in python need a name and def which is short for define.
31
What are the advantages of using subroutines?
- It can be called when needed. This improves the modularity of the code, makes it easier to understand and helps in the identification of errors. - There is only one section of code to debug. - There is only one section of code to update
32
Types of subroutines
-Procedures: Small sections of code that can be reused, they do not return a value. In pseudocode: Procedure/Endprocedure. They are called by using the CALL statement. -Functions: They have one or more values passed to them and one or more values are returned to the main program after they have completed running. In pseudocode: FUNCTION(values to be passed in)/ENDFUNCTION The CALL statement is used to execute the function but the values required must be passed to the function at the same time: CALLmy_function(values required by the function)