- {1, 2, 3, ....}
- {0, 1, 2, 3, ...}
- Either signed or unsigned, denoted by referring to the set of all integers
- Utilizes the digits 0 - 9
- Terminating decimals, or repeating decimals (P / Q) Where P & Q are both integers, and Q != 0.
- 1/1 = 1 is a rational number, 2/1 is a rational number.
- Neither terminate nor repeat, ie: π (Pi)
- Rational Numbers + Irrational Numbers
- Base 2
- Converting Whole numbers to binary is easy.
- Steps are as follows:
- Divide by 2, remainder represents LSB (Least Significant Bit)
- Continue to divide by two, until division by 2 is not possible.
- The final remainder will represent the MSB (Most Significant Bit)
- Written MSB on left, LSB on right.
Written: 11001
- Like all systems utilizes place value. Ie: 10110 = (1 * 2^4) + (0 * 2^3) + (1 *2^2) + (1 * 2^1) + (0 * 2^0) = 22
Hexadecimal
- Base 16
- Utilizes digits 0 - 9
- Expands, to include A, B, C, D, E, F - A representing 10, continuing respectively
- Utilizes the same place value system as used in our number systems across the board, however with a base of 16.
- Example: 2BD = (2 * 16^2) + (11 * 16^1) + (2 * 16^0)
- Converting Whole numbers to hexadecimal is identical to converting whole numbers to binary except a divisor of 16 is used. Example: 589 / 16 = 36 r. 13, 36 / 16 = 2 r. 4, 2 / 16 = 0 r. 2 , written: 24D
- Converting hexadecimal to binary, divide the Hex Digits into 4 bit patterns (nibbles), 24D for example = 0010 / 0100 / 1101 -> 001001001101
- Each hex digit = nibble, 2 Hex digits = 1 byte
No comments:
Post a Comment