CS50 Flashcards
what is the input to any computer?
elictiricity
what does electricity represent in computers?
zeros and ones
what is the highest you can count with 3 light bulbes?
up to 7 as we count from 0 and we have 8 patterns to count
how did we count that 123 is one hundred and twenty 3?
because from the right to the left we use the base of 10 3 * 1 + 10^0 2 * 10 + 10^1 1 * 100 + = 10^2 123
what is the base to calculate in binary systems?
2 ^ 0 1
2 ^1 2
2^ 2 4
how to represent letters in binary?
we use numbers to represent each letter
what is a byte?
8 bits
what is a bit?
a zero or a one
how many letters can u represent with a byte?
256
what is an algorithm?
it’s a step by step instruction to solve a problem
what is a compiler?
a software that converts source code to machine code?
what is machine code?
it’s the language of zeros and ones
how is the code evaluated?
from right to left
how many bytes in an int?
4 bytes (32 bits)
what is an unsigned integer?
it’s not a new data type it’s just a qualifier for int meaning it changes it’s properties containing only positive values