machines Flashcards

what you (as an up-and-coming computer-scientist) need to know about the machines that run your code

1
Q

what do computers understand?

A

0’s and 1’s

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

how does a computer interpret electricity?

A

when the power flowing through a circuit is above a pre-specified level for a pre-specified period of time, the computer interprets that as a “1”, and when it is below a pre-specified level, for said amount of time, it perceives a “0”

and, yes, that pre-specified amount of time is wicked fast!!!

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

what are logic gates?

A

AND, OR, XOR, NOT, NAND, NOR and XNOR
you can create “electric circuits” (think: battery, wires, and a light-bulb) that cause the light to shine based on the logic of your circuit, as applied to it’s inputs

For example, if you create an “OR” gate-circuit, then only when one (and only one) of the two input-wires pass a current (i.e. 1’s) through your circuit, will result in the light glow.

for more see: https://whatis.techtarget.com/definition/logic-gate-AND-OR-XOR-NOT-NAND-NOR-and-XNOR

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

how do computers understand words?

A

as a string of binary (i.e. 1’s and 0’s)

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

what does “f” have to do with binary?

A

as you know binary #’s are base-2,
and hexidecimal #’s are base 16.
instead of the lazy humans having to type:
“0b1111” or (base-10) “15”, we simply type “f”

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

what is the base for binary #’s?

A

binary #’s are base 2

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

what is the base for the #’s we normally use?

A

decimal #’s are base-10

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

what base are the computer-related set of “numbers” require letters?

A

hexadecimal #’s are base 16

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

what is the decimal equivalent of a hexidecimal “b”?

A

11

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

what is the largest hexidecimal digit?

A

f

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

what is the decimal equivalent of a hexidecimal “f”?

A

15

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

how to computers interpret the letter “A” (when it’s intended as a letter and not a number)?

A

65 (according to the “ascii” encoding system;

see: https://ascii.cl/

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

if computers understand numbers why can I program with words?

A

because some nice-humans who wrote in “binary”, wrote software (i.e. compilers & interpreters) that translate what you type into #’s …so you don’t have-to…

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