1. Number Systems Flashcards
Hexadecimal
Base 16
0-9 ABCDEF
A representing 10
and F representing 15
Denary/Decimal
Base 10
0-9
Binary
Base 2
Represented in 1’s and 0’s
ASCII Codes
American Standard Code for Information Interchange
.0 | 48 | A | 65 | a | 97 ..1 | 49 | B | 66 | b | 98 .2 | 50 | C | 67 | c | 99 ........................................... .9 | 57 | Z | 90 | z | 122
(Character | Code)
The ASCII character set uses 7 bits to encode every character. How many characters can be represented?
128 Characters
Bit Conversions
Bit = Binary Digit 8 bits = 1 byte 1000 bytes = 1 kilobyte 10^3 1000 kilobytes = 1 megabyte 10^6 1000 megabytes = 1 gigabyte 10^9 1000 gigabytes = 1 terabyte 10^12 1000 terabytes = 1 petabyte 10^15
Binary Addition
0 + 1 = 1
1 + 0 = 1
1 + 1 = 1 0 (Carries the one)
1 + 1 + 1 = 11
. 00001111 (15)
+00001111 (15)
—————-
00011110 (30)
Signed
Unsigned
Signed - Can be negative or positive
Unsigned - Always positive
Multiply in Binary
a) 3 x 6
b) 5 x 11
c) 13 x 21
a) 0001 0010
b) 0011 0111
c) 0001 0001 0001
Subtract in binary
a) 10 - 5
b) 4 - 7
c) 11 - 13
a) 000 1010
b) 1111 1101 (Signed)
d) 1111 1110 (Signed)
What is the range of unsigned numbers?
0 - 255
What is the range of signed numbers?
-128 - 127
How to multiply any binary number by 2?
Shift the binary number to the left by one
Add a zero
How to divide any binary number 2?
Shift binary number to the right by one
Take away a zero, if there is a one, put a decimal point in between
What are these number types:
ℤ, ℕ, ℚ, I, ξ, ℝ
ℤ - Integer (Whole numbers)
ℕ - Natural Number (Whole numbers => 0)
ℚ - Rational Number (Can be in a fraction or ratio)
ℝ - Real Numbers (All numbers excluding imaginary)
I - Irrational Number (Cannot be a fraction or ratio)
ξ - Ordinal Number (A number used to identify position like in arrays)