Module 4 Number Theory and Number System
Module 4 Number Theory and Number System
Theory
MS. LOQUE
What is number theory?
Number Theory is the study of set of integers and their properties.
Topics:
1.Congruence Modulo
3.Number System
Divisibility
Divisibility is when a and b are integers with a ≠ 0 , we say that a divides b if there is
𝑏
an integer c such that b = ac, or equivalently, if is an integer. The notation a∣b
𝑎
denotes that a divides b.
Here, a is the divisor and b is multiple. It is usually denoted a|b, or some authors
denoted it by b:a. but here, we will go with the first notation.
In symbol, 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑚), where a is the dividend, b is the remainder, m is the divisor and
"≡" is the symbol for congruence.
Theorem 5.1
Let 𝑚 be a positive integer, if 𝑎 ≡ 𝑏(𝑚𝑜𝑑 𝑚) and 𝑐 ≡ 𝑑 𝑚𝑜𝑑 𝑚 , then
1. 𝑎 ± 𝑐 ≡ 𝑏 ± 𝑑 𝑚𝑜𝑑 𝑚
2. 𝑎𝑐 ≡ 𝑏𝑑 𝑚𝑜𝑑 𝑚
3. 𝑎𝑘 ≡ 𝑏 𝑘 𝑚𝑜𝑑 𝑚 , ∀𝑘 ∈ ℕ
4. 𝑎 ≡ 𝑏 𝑚𝑜𝑑 𝑚 → 𝑎 𝑚𝑜𝑑 𝑚 = 𝑏(𝑚𝑜𝑑 𝑚)
Theorem 5.2
Let m > 1 be fixed and 𝑎, 𝑏, 𝑐, 𝑑 be arbitrary integers. Then Congruence Modulo m is an
equivalence relation.
▪ 𝑎 ≡ 𝑎 (𝑚𝑜𝑑 𝑚) for all 𝑎. (Reflexive)
▪ If 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑚), then 𝑏 ≡ 𝑎 (𝑚𝑜𝑑 𝑚). (Symmetric)
▪ If 𝑎 ≡ 𝑏 (𝑚𝑜𝑑 𝑚) and 𝑏 ≡ 𝑐 (𝑚𝑜𝑑 𝑚), then 𝑎 ≡ 𝑐 (𝑚𝑜𝑑 𝑚)
Examples:
Verify the following congruence statements
1. 15 ≡ 6 𝑚𝑜𝑑 9
2. −47 ≡ 17 𝑚𝑜𝑑 8
1. 𝑐 ≡ 4𝑎 𝑚𝑜𝑑 9
2. 𝑐 ≡ 3𝑏 𝑚𝑜𝑑 9
3. 𝑐 ≡ 6𝑎 − 5𝑏 𝑚𝑜𝑑 9
4. 𝑐 ≡ 𝑎2 + 𝑏 2 𝑚𝑜𝑑 9
Division Algorithm
In the equality given in the division algorithm, m is called the divisor, a is called the
dividend, q is called the quotient, and r is called the remainder. In symbol,
𝑞 = 𝑎 𝑑𝑖𝑣 𝑚
𝑟 ≡ 𝑎 𝑚𝑜𝑑 𝑚
𝑎 = 𝑏𝑞 + 𝑟, where 0 ≤ 𝑟 < 𝑏
Example:
What are the quotient and remainder when 101 is divided by 11?
Example:
What are the quotient and remainder when - 11 is divided by 3?
Example:
Use the division algorithm to find the quotient and remainder when a = 158 and
b =17.
Euclidean Algorithm
Let 𝑎 = 𝑏𝑞 + 𝑟, where 𝑎, 𝑏, 𝑞, and 𝑟 are integers. Then gcd 𝑎, 𝑏 = gcd(𝑏, 𝑟).
240300
= 5
= 48060
Base
Number System Set of Digits
Value
Decimal 10 0,1,2,3,4,5,6,7,8,9
Binary 2 0,1
Octal 8 0,1,2,3,4,5,6,7
Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F
Decimal Number System
➢ has base 10 because it uses ten digits from 0 to 9. In the decimal number system, the positions
successive to the left of the decimal point represent units, tens, hundreds, thousands, and so on. This
system is expressed in decimal numbers. Every position shows a particular power of the base (10).
Example:
The decimal number 1457 consists of the digit 7 in the units position, 5 in the tens place, 4 in
the hundreds position, and 1 in the thousands place whose value can be written as
1 × 1000 + 4 × 100 + 5 × 10 + 7 × 1
1 × 103 + 4 × 102 + 5 × 101 + 7 × 100
= 1000 + 400 + 50 + 7
∴ 145710
Binary Number System
The base 2 number system is also known as the Binary number system, wherein, only two binary
digits exist, i.e., 0 and 1. Specifically, the usual base-2 is a radix of 2. The figures described under this
system are known as binary numbers which are the combination of 0 and 1.
For example:
Example:
2008
Note:
2008 ≠ 20010
Hexadecimal Number System
In the hexadecimal system, numbers are written or represented with base 16. In the hex system,
the numbers are first represented just like in the decimal system i.e. from 0 to 9. Then, the
numbers are represented using the alphabets from A to F.
The below-given table shows the representation of numbers in the hexadecimal number
system.
Example: 2𝐴𝐹16
Conversion of
Number System
Decimal to Binary
Example:
Solution:
25 = 2 ∙ 12 + 1
12 = 2 ∙ 6 + 0
6= 2∙3+0
3= 2∙1+1
1= 2∙0+1
∴ (25)10 = (11001)2
Decimal to Octal
Example:
Solution:
128 = 8 ∙ 16 + 0
16 = 8 ∙ 2 + 0
2= 8∙0+2
∴ (128)10 = (200)8
Decimal to Hexadecimal
Example:
128 = 16 ∙ 8 + 0
8 = 16 ∙ 0 + 8
∴ (128)10 = (80)16
Binary to Decimal
Example:
Convert (1101)2 to Decimal number.
Solution:
1 ∙ 23 + 1 ∙ 22 + 0 ∙ 21 + 1 ∙ 20
= 8+4+0+1
= 13
∴ (1101)2 = (13)10
Octal to Decimal
Example:
Solution:
2 ∙ 81 + 2 ∙ 80
= 16 + 2
= 18
∴ 228 = 1810
Hexadecimal to Decimal
Example:
Solution:
1 ∙ 162 + 2 ∙ 161 + (1 ∙ 160 )
= 256 + 32 + 1
= 289
∴ 12116 = 28910
Hexadecimal to Binary
Shortcut Method
Example:
Solution:
∴ (89)16 = (10001001)2
Octal to Binary
(Shortcut)
Example:
Convert (214)8 into a Binary number.
Solution:
From the table,
2 = 010
1 = 001
4 = 100
∴ 2148 = (010001100)2
End of
Presentation! Number Theory
Number System
Prepared by:
Ms. Loque