Every topic starts at New. Sign in and your practice counts.
A number system is a way of writing and showing numbers. It uses specific digits or symbols to represent numbers. It helps us organize and understand numbers within a certain group. Number systems also make it easier to do basic math operations like addition, subtraction, multiplication, and division.
A number is a mathematical value used for counting or measuring or labelling objects. Numbers are used to perform arithmetic calculations. Examples include: , etc.
There are various types of number systems in mathematics. The four most common number system types are:
Decimal number system (Base- 10)
Binary number system (Base- 2)
Octal number system (Base-8)
Hexadecimal number system (Base- 16)
The decimal (also called Denary) number system is composed of the 10 symbols: , 7, 8 and 9. Using these symbols we can express any quantity. The decimal number system is called base 10 system because it has 10 digits. The decimal number system is a positional-value system, in which the value of a digit depends on its position in the number. For example, consider the decimal number 964. Here:
9 represents 9 hundreds
6 represents 6 tens
4 represents 4 units
The 9 carries the most weight. It is called the Most Significant Digit (MSD). The 4 carries the least weight and is called the Least Significant Digit (LSD). Each digit of a number carries weight that can be expressed as powers of 10. This is shown below, where the number 2745.214 is represented. The decimal point separates the positive powers of 10 from the negative powers.
In binary number system there are only two symbols or digits, 0 and 1 . The base of binary number system is 2 . All the statements made earlier about the decimal number system are equally applicable to the binary number system as well. The binary system is also a positional-value system, wherein each bit has its own value or weight expressed as power of 2 .
The Octal number system has a base of 8 , meaning it has eight possible digits; , and 7. Thus, each digit of an octal number system can have any value from 0 to 7. The digit positions in an octal number system have weight with powers of 8 . An octal number can be easily converted to its decimal equivalent by multiplying each digit by its positional weight.
For example,
The hexadecimal number system uses base 16. Thus it has 16 possible digits. It uses the digits 0-9 and letters A, B, C, D, E and F as the 16 digit symbols. The table shows the relationship among hexadecimal and decimal numbers. It is important to remember that hexadecimal digits A through are equivalent to the decimal values 10 through 15.
| Hexadecimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | A | B | C | D | E | F |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Decimal | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
A hexadecimal number can be converted to its decimal equivalent by using the fact that each digit position has a weight that is power of 16 . The LSD has a weight of the next higher digit has a weight of , the next higher digit has a weight of , and so on. The conversion process is shown below.
To convert a number from any base to base-10 (decimal), you need to convert each digit of the number to its decimal equivalent. Then, you use base-10 arithmetic to expand the number by multiplying each digit by the base raised to the power of its position (starting from 0 on the right). Finally, add the results together to get the decimal value.
Example2: (100101.1011), to ( ? J10
| Example: (18E8) to ( | ? 10 |
|---|---|
a. Convert the following Binary numbers to Decimal
i. 11100011
ii. 101010101
iii. 11001.1001
iv. 10001.111
b. Convert the following Octal numbers to Decimal
i. 3452
ii. 1256
iii. 7454
iv. 2743
c. Convert the following Hexadecimal numbers to Decimal
i. AB01F
ii. FE162B
iii. 9C17D
iv. 8D00A -
To convert a decimal number to any other number:
The following examples will demonstrate the above method by converting the decimal numbers to their binary, octal and hexadecimal equivalents, respectively.
-> Multiply the decimal part by 2 .
-) Record the integer part (0 or 1). This becomes the next binary digit.
-) Remove the integer part from the product, leaving only the decimal part.
| Example1: (179.257) ho to ( ? ) | ||||||
|---|---|---|---|---|---|---|
| Stepit: Converting integer part 179 to binary | Step2: Converting fractional part 0.257 to binary | |||||
| 2 179 Remainder | Blnary | |||||
| = | 0.514 |
a. Convert the following Decimal numbers to Binary
The conversion from Octal to Binary and vice versa is performed by converting each octal digit to its 3-bit binary equivalent. The eight possible digits are converted as follows:
| Octal digit | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|---|
| Binary | 000 | 001 | 010 | 011 | 100 | 101 | 110 | 111 |
Using these conversions, any octal number can be converted to binary and vice versa.
a. Convert the following Octal numbers to Binary
i. 765
II. 1430
iii. 63005
iv. 4232
b. Convert the following Binary numbers to Octal
i. 10011110 il. 11000010110 ill. 1000001101 iv. 1110001001101010
The conversion from Hexadecimal to Binary and vice versa is performed by converting each octal digit to its 4-bit binary equivalent. The eight possible digits are converted as follows:
| Hexadecimal | Binary |
|---|---|
| 0 | 0000 |
| 1 | 0001 |
| 2 | 0010 |
| 3 | 0011 |
|---|---|
| 4 | 0100 |
| 5 | 0101 |
| 6 | 0110 |
| 7 | 0111 |
| 8 | 1000 |
| 9 | 1001 |
| A (10) | 1010 |
| B(11) | 1011 |
| C(12) | 1100 |
| D (13) | 1101 |
| E (14) | 1110 |
| F(15) | 1111 |
Using these conversions, any Hexadecimal number can be converted to binary and vice versa.
00110011001 01101
a. Convert the following Hexadecimal numbers to Binary
I. AF765
II. D14C0
III. B300E
iv. C42F2
b. Convert the following Binary numbers to Hexadecimal
i. 1001100001000110 ii. 11011100010110 iii. 10001100001101 iv. 111000100000110101110
Convert Octal to Decimal number
Then convert the decimal number to Hexadecimal
Convert Octal to Binary number
Then convert the binary number to Hexadecimal
Convert Hexadecimal to Decimal number
-) Then convert the decimal number to Octal
-> Convert Hexadecimal to Binary number
| Example: (A09D) is to ( ? )n | |||
|---|---|---|---|
| Method 1: | (A09D) |
a. Convert the following Hexadecimal numbers to Octal
i. AF65
ii. D1C0
iii. B30E
iv. C2F2
b. Convert the following Octal numbers to Hexadecimal
i. 765 ii. 1430 iii. 63005 iv. 4232
Computers use binary arithmetic as their fundamental way of performing arithmetic operations because digital electronic circuits inherently operate in binary (base-2) rather than in decimal (base-10) like humans do. In binary arithmetic, there are only two digits: 0 and 1.
Basic Arithmetic Operations: Computers perform addition, subtraction, multiplication, and division in binary just like in decimal, but with binary digits (bits) instead of decimal digits.
To verify your answer you can convert the binary number to decimal and perform decimal arithmetic, like in Example 1 (Addition).
When subtracting two binary digits (bits), the possible outcomes are:
a. Perform the following Binary Additions
I.
II.
III. 11111101 + 10110111
iv. 10101011 + 10110001
b. Perform the following Binary Subtractions
I. 11100001-1011001
ii.
iii. 11111101-101101
iv.
In computers, overflow and underflow are problems that occur when calculations produce results that are too large or too small to' be represented within the allowed number of bits. These conditions are important because they can cause errors in programs and lead to unexpected behavior or bugs. Overflow happens when a value is too large to fit in the available space, while underflow occurs when a value is too small to be represented properly. Understanding these issues is important to prevent problems in software. Overflow is being explained as follows at that level.
Overflow: Overflow happens when a calculation produces a result that is larger than the maximum value that can be stored or represented with the available number of digits or bits in a system. This causes the system to be unable to properly show or handle the result.
An 8 -bit unsigned integer can represent values from 0 to 255 . If user attempts to add 1 to 255, the result is 256, which cannot be represented with just 8 bits.
Since an 8 -bit register can only store 8 bits, the ninth bit (1) is the overflow bit, which will be lost and the overall result becomes wrong. This situation can be overcome by introducing 16-bit register.
To handle overflow and underflow, programmers can:
-> Use Larger Data Types: Switching to a larger data type (e.g., from an 8-bit integer to a 16-bit integer) can help avoid overflow and underflow for larger ranges of values.
-) Perform Range Checking: Before performing an arithmetic operation, check if the operation will result in a value outside the representable range and handle it appropriately.
In digital logic, 'Complements' are used to perform logical operations, especially the subtraction operation. The binary number system contains two types of complements, i.e., 1's complement and 2's complement.
The binary numbers can be easily converted into the 1's complement with the help of a simple technique. According to this algorithm, if we toggle or invert all bits of a binary number, the generated binary number wil I become the 1's complement of that binary number. That means we have to transform 1 bit into the 0 bit and 0 bit into the 1 bit in the 1 's complement.
The binary numbers can be converted into the 2's complement with the help of a very simple technique.
Example1: 2's complement of binary number 01010001
01010001 (Number)
10101110 (1's Complement)
+1 (Adding 1)
10101111 (2's Complement)
So the 2's Complement of 01010001 is 10101111
Example2: 2's complement of binary number 10101110
a. Convert the following Binary numbers to their 1's Complement forms.
ii. 11001100
iii. 11100011
iv. 01010101
l. 00111001
b. Convert the following Binary numbers to their 2's Complement forms.
j. 01111001
ii. 10001101
iii. 11101011
iv. 01011101
The following steps are used to perform binary subtraction using 1's Complement.
111000 (Minuend)
100110 (Subtrahend)
011001
111000
1-010001
The following steps are used to perform binary subtraction using 2's Complement.
111000 (Minuend)
100110 (Subtrahend)
011001
1-010010
a. Convert the following Binary numbers to their 1's Complement forms.
i. 00111001
ii. 11001100
iii. 11100011
iv. 01010101
b. Convert the following Binary numbers to their 2's Complement forms.
i. 01111001
ii. 10001101
iii. 11101011
iv. 01011101
Binary numbers can be represented in signed and unsigned way. Unsigned binary numbers do not have sign bit, whereas signed binary numbers uses signed bit as well or these can be distinguishable between positive and negative numbers.
Unsigned numbers don't have any sign, these can contain only magnitude of the number. So, representation of unsigned binary numbers are all positive numbers only. For example, representation of positive decimal numbers are positive by default. We always assume that there is a positive sign symbol in front of every number. The range of unsigned binary number is from 0 to , where is the number of bits. For example in 8 -bits form the range will be from 0 to 255 (decimal) and 00000000 to 11111111 (binary)
Example: Represent decimal number 105 in unsigned binary number.
Simply convert 105 into Binary number.
To get the 2's complement of a number, flip all the bits and then add 1 to the least significant bit (LSB). We use regular binary for positive numbers and 2's complement for negative numbers.
If the sign bit is 0 , the number is positive and we can just use its regular binary form.
If the sign bit is 1 , the number is negative, and we need to use the 2 's complement of the binary number to get its value.
Represent the following numbers using 8 -bit 2 's complement.
i. -90
ii. -122
iii. -150
iv. -200
v. -240
Floating point numbers are a way to represent real numbers that can have fractional parts. They are used in computers to handle very large and very small numbers efficiently, as well as to perform arithmetic operations on them.
Floating point numbers are represented in a computer using a standard format defined by the IEEE (Institute of Electrical and Electronics Engineers). The most common format is IEEE 754, which specifies how floating point numbers should be stored in binary.
A floating point number in the IEEE 754 format is divided into three parts:
Sign Bit: Indicates whether the number is positive or negative.
Exponent: Represents the power of 2 by which the fraction (or mantissa) is multiplied.
Mantissa (or Significand): Represents the significant digits of the number.
For example, in a 32-bit (single precision) floating point representation is shown in Figure.
1 bit for the sign
8 bits for the exponent
23 bits for the mantissa
Note: Further details about how floating point numbers are represented are beyond the scope of grade 10 students.
In general, any number is simply the sum of the products of each digit value times its positional value.
The binary number is represented above and its equivalent decimal value can be found by taking the sum of the products of each bit value ( 0 or 1 ) times its positional value. The left most bit carries the most weight and it is called the Most Significant Bit (MSB). The positions to the right of the binary point are negative powers of 2 . The right most bit carries the least weight and is referred to as the least significant bit (LSB).
Another example:
ii. Conversion from Octal to Decimal
Exampl - (ce) s
| 2 2 2 | 89 | 1 | = | 1.028 |
| 44 | 1 | = | 0.056 |
| 22 | 0 | = | 0.112 |
| 2 2 | 11 | 0 | = | 0.224 |
| 5 | 1 | = | 0.448 |
| 2 2 | 2 | 1 | = | 0.896 |
| So, |
| Example1: (179.257)io to ( | |||||
|---|---|---|---|---|---|
| Step1: Converting Integer part 179 to binary | Step2: Converting fractional part 0.257 to binary | ||||
| 2 179 Remainder | Binary | ||||
| = | |||||
| 2 | 89 | 1 | = | ||
| 2 2 2 | 1 | ||||
| 0 | |||||
| 2 | 0 | ||||
| 5 | 1 | = | |||
| 2 2 | 2 | 1 | = | ||
| 1 | ., 0 | = | |||
| So, |
ii. From Decimal to Octal
| Example 1: | (165)io to ( | ? | Example 2: | (331) 10 to ( | ? |
|---|---|---|---|---|---|
| 8 165 Remainder 8 20 5 8 2 4 | 8 331 Remainder 8 41 3 8 5 1 |
iii. From Decimal to Hexadecimal
| Example 1: (739)io to ( ? )i6 Example 2: (365)io to ( ? )2 (739)io to ( ? )i6 Example 2: (365)io to ( ? )2 Example 2: (365)io to ( ? )2 | |
|---|---|
| 16 739 Remainder 16 46 3 16 2 14 2 E 3 | 16 3501 Remainder 16 218 13 16 13 10 131013 D A D DAD) |
| (Method Is already Explained) |
| (120235) | (Method is already Explained) |
| So, (A09D) to (120235) |
| Method 2: | (A09D) | (1010000010011101), | (Method Is already Explained) |
| (120235) { Method is already Explained) |
| So, (A09D) to (120235) |
Some Examples of Binary Addition:
Some Examples of Binary Subtraction:
Signed Numbers Representation:
Signed numbers can represent both positive and negative integers. There are several methods to
represent signed numbers, but the most common one used in modern computers is Two's Complement.