CT3 Flashcards
What are the numbers that make up the binary line?
128, 64, 32, 16, 8, 4, 2, 1
What numbers are binary?
1 and 0
What does 0 mean?
on
What does 1 mean?
off
Why are there only two numbers in binary?
only language the computer understands
0+0
0
0+1
1
1+0
1
1+1
0 carry 1
1+1+1
1 carry 1
`16 x 1
16
16 x 2
32
16 x 3
48
16 x 4
64
16 x 5
80
16 x 6
96
16 x 7
112
16 x 8
128
16 x 9
144
16 x 10
160
16 x 11
176
16 x 12
192
What is the Hexadecimal line
0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
How to convert HEX to dinery?
-Times the first number by 16
-Add the other number to the answer
How to convert dinery to HEX?
-Divide the number by 16
-Convert it into HEX by using the HEX line
What is a NOT gate?
-One input
-output is the opposite of the input
What is the truth table for a NOT gate?
P-Q
0-1
1-0
What does a NOT gate look like?
One input going to a triangle with a circle t the top, then has one output.
What is an AND gate?
How many inputs and outputs?
-Two inputs
-One output
What is the truth table for an AND gate?
A-B - Q
0-0 - 0
1-0 -0
0-1 - 0
1-1- 1
What does an AND gate look like?
-Two inputs
-rectangle with a rounded edge
-one output
What is an OR gate?
How many inputs and outputs?
-Two inputs
-One output
What is the truth table for an OR gate?
A-B - Q
0-0 - 0
1-1 - 1
0-1 - 1
1-0 - 1
What does an OR gate look like?
-Two inputs
-Into an arrow shape
-One output
What is a computer system made of?
Input, output and storage devices
What are the common components of a computer system?
RAM, ROM, CPU, Motherboard, hard drive, BIOS
What are the main functions of the operating system?
File management
User management
User interface
Memory management
Device management
What does the operating system provide?
security- username and passwords and firewalls
What are variables?
Stores data and memories.
How many pieces of data can a variable hold??
1
What happens to the variable is you run your code??
It changes
What are the 5 different data types??
Char (Character)
String
Integer
Float
Boolean
What is a string in code?
anything in speech marks or a mixture of letters and numbers.
What is an integer??
whole numbers
What is a float??
decimal
What is a boolean?
Yes/No or True/False
How do you write comments in code?
Start with a #
What are the four command words?
print()
input
if:
else:
What are the two errors that can come up in code?
logic
syntax
What will happen to the code if there is a logic error?
code run but output will not be correct
What is a syntax error?
not run code
Arrow with a line inside?
Storage