CH5 Flashcards
Name the four number systems commonly used in programming:
(name with its base)
- binary (base: 2)
- octal (base: 8)
- decimal (base: 10)
- hexadecimal (base: 16)
which number system includes letters?
hexadecimal
in the decimal number system, the digits range from?
0 to 9
the smallest “unit” of data on a binary computer is a ______ bit.
single
T/F: modern computers operate using hexadecimal logic.
F, binary logic.
the computer represents values using two voltage levels (usually __V for logic 0 and either ____V or ___V for logic 1).
0V for logic 0, and either +3.3V or +5V for logic 1.
Steps for converting from any number system to the decimal number system:
1- number the digits starting from 0. (right to left)
2- multiply each digit to the base of its number system (to the power of the digit’s position)
3- add them all together
[note if the number you are trying to convert has a decimal then every digit before the decimal will have a negative position number (-1, -2,..)]
steps of converting from the decimal number system to any other system:
1- divide the number by the base of the system you want to convert it to
2- divide the integer part by the base (until you can’t) and write down its remainder each time.
2- concate each remainder (down to up).
In the hexadecimal number system, the letter range from?
from A to F
steps converting from binary to any other system:
1- divide the digits into groups of (three[for oct.]/four[for hex.])
2- translate each group .
in binary, 1+1 =
10 ( one and zero. not ten. )
in binary, 0 - 1 =
take from the neighbouring digit (like normally in subtraction), then the 0 will be 2. so it’ll be 2 - 1 = 1
A =
10
B =
11
C =
12
D =
13