Professional Documents
Culture Documents
Chapter 6 Integer
Chapter 6 Integer
DEFINITION: An INTEGER is a whole number (not a fractional number) that can be positive, negative, or zero.
DIVISIBILITY
Divisibility determines if there will be a remainder when an integer division operation occurs.
If one value, a, is divisible by another value, b, it is said that b divides into a evenly. In this case, there is no
remainder from the division operation and the result of a/b is an integer. If a is not divisible by b, then b does not
divide into a evenly. In this case, there is a remainder from the division operation and the result of a/b is not an
integer.
EXAMPLE:
6
6 is divisible by 3. This is because =2 , which is an integer.
3
9 1
9 is not divisible by 2. This is because =4 2 or 4.5 = 4 with a remainder of 1. Then, the division operation produces a
2
remainder, and the result of 9/2 is not an integer.
DIVISION ALGORITHM
The division algorithm is as follows: for any integer, a, and any positive integer, b, there exist unique integers n
and r, such that a=bn+r ,where r is greater than or equal to 0 and less than b.
In the division algorithm equation,
a is the dividend (the larger number that is divided by a smaller number),
b is the divisor (the number that is divided into a larger number),
r is the remainder (the number left over when the dividend is divided by the divisor to produce an
integer), and
n is the highest integer that is less than or equal to the quotient (the result when the dividend is divided
by the divisor).
The floor function is the function used to find the greatest integer that is less than or equal to a value:
n=|q| where q is the quotient of the division operation.
The remainder can be found by performing subtraction:
the remainder is the dividend minus the product of the divisor and the floor of the quotient.
This can be expressed by rearranging the division algorithm:
a−bn=r
The remainder can also be found by repeatedly subtracting the divisor from the dividend until the result is
smaller than the divisor itself. Then, the ending result is the remainder.
If a value, p, is divisible by another value, m , then the remainder is zero and the division algorithm looks like
p
p=mq, where q is the quotient of .
m
DIVISIBILITY RULES
There are rules to test if a large number is divisible by various smaller numbers, called the divisibility rules.
Every positive integer is divisible by 1.
A positive integer is divisible by 2 if the last digit of the dividend is even.
A positive integer is divisible by 3 if the sum of the digits of the dividend is divisible by 3.
A positive integer is divisible by 4 if the last two digits of the dividend are divisible by 4.
A positive integer is divisible by 5 if the last digit of the dividend is 0 or 5.
A positive integer is divisible by 6 if the dividend is divisible by 2 and 3.
EXAMPLE:
SOLUTION:
EXAMPLE:
If 60 is the dividend, and 8 is the divisor, then by the division algorithm there exists unique integers m and r , such that
60 = 8m+r , where r is greater than 0, but less than 8. Find m and r .
SOLUTION:
Divide 60 by 8 to produce 7.5. Then, m can be found by taking the floor function of 7.5: ⌊ 7.5 ⌋ =7.
Notice that 8∗7=56. To find the remainder, subtract the result from 60: 60 – 56 = 4
Another way to find the remainder is to set up the division algorithm and solve for r.
60 = 8∗7+ r
60 = 56 + r
4=r
Then, the result when 60 is divided by 8 is 7 with a remainder of 4. The division algorithm for this problem can be written
as: 60 = 8∗7+ 4
m = 7, r = 4
EXAMPLE:
(a) 3
(b) 4
(c) 6
EXAMPLE: