23
1 Numbers 1. Factors 2. Multiples 3. Prime and Composite Numbers 4. Modular Arithmetic 5. Boolean Algebra 6. Modulo 2 Matrix Arithmetic 7. Number Systems SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics Dr Calum Macdonald

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Numbers

1. Factors

2. Multiples

3. Prime and Composite Numbers

4. Modular Arithmetic

5. Boolean Algebra

6. Modulo 2 Matrix Arithmetic

7. Number Systems

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT

Mathematics

Dr Calum Macdonald

Page 2: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

Numbers

In this section we will briefly discuss basic number theory along with some number systems.

1. Factors A factor of a given number is a number that divides exactly into that number.

Example 1

(i) The numbers 1, 2, 3, 4, 6 and 12 are all factors of 12 as they each divide exactly into 12.

(ii) The numbers 1, 2, 4, 5, 10 and 20 are all factors of 20 as they each divide exactly into 20.

(iii) The number 3 is not a factor of 20 as 3 does not divide exactly into 20.

2. Multiples A multiple is the result of multiplying a number by an integer.

Example 2

(i) 12 is a multiple of 6 since 2612 ×=

(ii) 60 is a multiple of 6 since 10660 ×=

(iii) 22 is not a multiple of 6.

3. Prime and Composite Numbers A prime number is a positive integer greater than 1 that has exactly two factors – these factors are the number itself and 1. In other words, a prime number can be divided only by 1 and by itself.

Example 3

(i) 7 is a prime number, since the only factors it has are 1 and 7. (ii) 13 is a prime number, since the only factors it has are 1 and 13.

The prime numbers less than 25 are 2, 3, 5, 7, 11, 13, 17, 19, 23.

Note: 0 and 1 are not prime numbers.

Note: 2 is the only even number that is a prime number.

A composite number is a positive integer which is not prime, i.e., it has at least one more factor than 1 and itself.

The composite numbers less than 25 are 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24.

Page 3: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

a) Sieve of Eratosthenes Eratosthenes of Cyrene lived approximately 275-195 BC and is best known for determining a very good approximation of the Earth's circumference and for inventing the "Sieve of Eratosthenes", a method of identifying prime numbers.

The procedure is demonstrated below where the prime numbers between 1 and 100 are identified.

1 2 3 4 5 6 7 8 9 10

11 12 13 14 15 16 17 18 19 20

21 22 23 24 25 26 27 28 29 30

31 32 33 34 35 36 37 38 39 40

41 42 43 44 45 46 47 48 49 50

51 52 53 54 55 56 57 58 59 60

61 62 63 64 65 66 67 68 69 70

71 72 73 74 75 76 77 78 79 80

81 82 83 84 85 86 87 88 89 90

91 92 93 94 95 96 97 98 99 100

Proceed as follows: 1. Cross 1 out as it is not a prime number. 2. Starting from 2, circle 2 and cross out every multiple of 2, i.e. every even number. 3. Starting with 3, circle 3, and cross out every multiple of 3. 4. Starting with 5, circle 5, and cross out every multiple of 5. 5. Starting with 7, circle 7 and cross out every multiple of 7. Question: How do we know when to stop?

Answer: We can stop at the square root of 100, i.e. 10. The reason for this is that any number less than 100 (91, for example), which is divisible by a number greater than the square root of 100 (13, in this example), is also divisible by a number less than the square root of 100 (7, in this example). So, we have already crossed out all such numbers.

Note: The numbers that are crossed are not primes, because they are multiples of other numbers. The numbers that are circled are primes.

Page 4: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

b) Prime Factors

Example 4: Find all prime factors of 40.

Solution: All the factors of 40 are 1, 2, 4, 5, 8, 10, 20, 40. However, only 2 and 5 are prime numbers. Therefore all the prime factors of 40 are 2 and 5.

c) Prime Factorisation

Any integer can be written as a product of prime numbers in a unique way (except for the order). The process is known as prime factorisation.

Example 5: Find the prime factorisation of 264.

Solution: We first note that 264 is an even number and can therefore be divided by 2, i.e.

1322264 ×=

11322233222

6622

××××=×××=

××=

d) Highest Common Factor (HCF)

The HCF of two (or more) numbers is the largest number that divides exactly into both numbers.

Example 6: Find the HCF of 24 and 32.

Solution: For ‘small’ numbers like 24 and 32 the easiest method is to proceed as follows:

Write down the factors of the smaller number, starting from the largest factor: The factors of 24 are 24, 12, 8, 6, 3, 2, 1.

Write down the factors of the smaller number, starting from the largest factor: The factors of 32 are 32, 16, 8, 4, 2, 1. The first factor of the smaller number that is also a factor of the larger number is a HCF.

Hence, the HCF of 24 and 32 is 8.

Note: The HCF is also known as the greatest common divisor (GCD).

Note: To find the HCF of larger numbers we use prime factorisation.

Page 5: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

e) Lowest Common Multiple (LCM)

The LCM of two (or more) numbers is the smallest number that is a multiple of both the numbers.

Example 7: Find the LCM of 9 and 12.

Solution: For ‘small’ numbers like 9 and 12 the easiest method is to:

Write down several multiples the smaller number: Multiples of 9 are: 9, 18, 27, 36, 45, 54, . . .

Write down the multiples of the larger number until one of them is also a multiple of the smaller number: Multiples of 12 are: 12, 24, 36, . . .

Now, 36 is also a multiple of 9 and so the LCM of 9 and 12 is 36.

To find the LCM of larger numbers we use prime factorisation.

Page 6: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

4. Modular Arithmetic

Modular arithmetic, or clock arithmetic as it is sometimes known, was first studied by Gauss

in the late 18th century. It is a special type of arithmetic involving integers and features in

branches of mathematics such as number theory and abstract algebra. Modular arithmetic is

the central mathematical concept in cryptography and in computing the arithmetic operations

performed by most computers use it. In everyday life we encounter modular arithmetic, even

though we may not realise it, when we tell the time. Hence the term clock arithmetic.

In modulo m arithmetic all integers are replaced by their remainders after division by m. For

example, if 8 is divided by 6 the remainder is 2. Here 6 is called the modulus and we write

8 (mod 6) = 2. We can perform this calculation for any number:

0 (mod 6) = 0

1 (mod 6) = 1

2 (mod 6) = 2

3 (mod 6) = 3

4 (mod 6) = 4

5 (mod 6) = 5

6 (mod 6) = 0

7 (mod 6) = 1, etc.

Every time we reach a multiple of 6 we start counting from 0 again.

The set of integers modulo 6 is {0, 1, 2, 3, 4, 5}.

In general, the set of integers modulo m is defined as {0, 1, 2, 3, . . . , m - 1}.

Page 7: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

a) Arithmetic Calculations

Modular arithmetic allows standard mathematical calculations such as addition, subtraction and

multiplication along with division by certain numbers. To illustrate addition and multiplication

we will construct the addition and multiplication tables for Ζ6. Recall that we only use the

integers 0, 1, 2, 3, 4 and 5 and every time we reach a multiple of 6 we return to 0.

Addition

(1) Add the numbers together to obtain their sum.

(2) Divide the sum by the modulus to obtain the remainder which is the answer.

Example 8

(i) (3 + 1) mod 6 = 4 mod 6 = 4, (2 + 4) mod 6 = 6 mod 6 = 0

(ii) (4 + 4) mod 6 = 8 mod 6 = 2, (5 + 2) mod 6 = 7 mod 6 = 1.

+ 0 1 2 3 4 5

0 0 1 2 3 4 5

1 1 2 3 4 5 0

2 2 3 4 5 0 1

3 3 4 5 0 1 2

4 4 5 0 1 2 3

5 5 0 1 2 3 4

Addition Table for Ζ6

Page 8: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

Multiplication

(1) Multiply the numbers together to obtain their product.

(2) Divide the product by the modulus to obtain the remainder which is the answer.

Example 9

(i) (2 × 3) mod 6 = 6 mod 6 = 0, (3 × 5) mod 6 = 15 mod 6 = 3

(ii) (4 × 5) mod 6 = 20 mod 6 = 2, (5 × 5) mod 6 = 25 mod 6 = 1.

× 0 1 2 3 4 5

0 0 0 0 0 0 0

1 0 1 2 3 4 5

2 0 2 4 0 2 4

3 0 3 0 3 0 3

4 0 4 2 0 4 2

5 0 5 4 3 2 1

Multiplication Table for Ζ6

Note: These tables are often called Cayley tables after the British Mathematician Arthur

Cayley (1821-1895).

Clock Arithmetic: Note that on the 24 hour clock 17:00 hours corresponds to 5:00pm on the

12 hour clock. This is actually obtained using modulo 12 arithmetic, i.e. 17 (mod 12) = 5.

Page 9: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

 

c) Subtraction

(1) Perform the subtraction.

(2) Divide the sum by the modulus to calculate the remainder.

There are two possible outcomes:

A. The answer is positive

Example 10: (8 – 2) mod 9 = 6 mod 9 = 6; (12 – 5) mod 3 = 7 mod 3 = 1.

B. The answer is negative

Add the modulus to the answer to get a positive number between 0 and the modulus.

Example 11:

(i) (2 – 5) mod 7 = -3 mod 7 = 4 since –3 + 7 = 4

(ii) (4 – 15) mod 7 = -11 mod 7 = 3 since –11 + 7 + 7 =3

Page 10: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

10 

 

5. Boolean Algebra

Boolean Algebra was introduced by the English mathematician George Boole in 1854 and has

many practical applications in the physical sciences including electrical engineering and

computing. Essentially it is algebra suited to two-valued computer logic and enables algebraic

manipulation of logical statements that occur in, for example, digital circuit theory.

A two element Boolean algebra is a set {0, 1} together with the binary operations sum and

product, and the unary operation, complementation (also called negation). The two states, 1

and 0 are sometimes referred to as TRUE (T) and FALSE (F); ‘ON’ and ‘OFF’; ‘YES’ and

‘NO’; ‘HIGH’ and ‘LOW’, etc. The logical operators: sum, product and complementation are

associated with the OR, AND, and NOT operators in propositional logic.

In Boolean algebra 1 + 1 = 1, just as ‘TRUE OR TRUE’ results in TRUE in propositional

logic. Boolean addition corresponds to the logical OR function.

In Boolean algebra 1 × 1 = 1, just as ‘TRUE AND TRUE’ results in TRUE in propositional

logic. Note that Boolean multiplication is identical to standard arithmetic multiplication in that

anything multiplied by 0 yields 0, and anything multiplied by 1 remains unchanged.

Boolean multiplication corresponds to the logical AND function.

Consider the electric circuits shown in the schematic diagrams below:

For current to flow from A to B we need to have both switches CLOSED, i.e. we need

1S AND 2S CLOSED.

For current to flow from A to B we can have either one switch CLOSED or both switches CLOSED, i.e. we need 1S OR 2S CLOSED.

A B

S1

S2

A B S1 S2

Page 11: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

11 

 

6. Modulo 2 Matrix Arithmetic

We can now extend the concept of matrix multiplication, encountered earlier in the course, to

operations on matrices in which the elements are all 0 or 1 with addition and multiplication

carried out modulo 2.

Example 12

(i) ⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡++++

=⎥⎦

⎤⎢⎣

⎡×+××+××+××+×

=⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡0110

00100100

0110110000111001

0110

1001

.

(ii) ⎥⎥⎥

⎢⎢⎢

×+×+××+×+××+×+××+×+××+×+××+×+××+×+××+×+××+×+×

=⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

101111001111100111011011011011110011111110011110110110

101110111

011101110

.

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

++++++++++++++++++

=001110011

011011001001001101110010100

.

(iii) ⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡++++

=⎥⎦

⎤⎢⎣

⎡×+××+××+××+×

=⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡0000

11111111

1111111111111111

1111

1111

.

(iv) ⎥⎦

⎤⎢⎣

⎡×+×+××+×+××+×+××+×+×

=⎥⎥⎥

⎢⎢⎢

⎥⎦

⎤⎢⎣

⎡101100001110101101001111

101101

010011

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡++++++++

=1110

010010010011

(v) ⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

+++++++++

=⎥⎥⎥

⎢⎢⎢

⎡+

⎥⎥⎥

⎢⎢⎢

110011001

100111111001111110

101110111

011101110

Page 12: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

12 

 

7. Number Systems

We are all familiar with the decimal (Base 10) number which uses the digits 0 to 9. Here we will look at the binary (Base 2) and hexadecimal (Base 16) number systems as they are widely used in computing. Here we will briefly define these three number systems and then look at converting numbers between the three systems. To avoid confusion, where appropriate, we will write the base as a subscript to the number. a). Decimal Number System The decimal, or Base 10, number system uses the ten symbols (digits) 0, 1,2, 3, 4, 5, 6, 7, 8, 9 to represent numbers. b). BinaryNumber System The binary, or Base 2, number system uses the two symbols (binary digits or bits) 0 and 1 to represent numbers. Binary numbers are closely related to digital electronics. In digital electronics a ‘1’ means that current / electricity is present and a ‘0’ means it is not present. The different parts of a computer communicate through pulses of current (1s and 0s). c). Hexadecimal Number System The hexadecimal, or Base 16, number system uses the sixteen symbols,

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F. to represent numbers. Hexadecimal is very common in computing because each hexadecimal digit represents four binary digits (bits), i.e. two hexadecimal digits code 8 bits (1 byte).

Page 13: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

13 

 

Decimal to Binary to Hexadecimal Look-Up Table The following table shows the numbers 0 to 15 in the decimal, binary and hexadecimal number systems. You should familiarize yourself with these values.

Decimal (Base 10)

Binary (Base 2)

Hexadecimal(Base 16)

0 0000 0 1 0001 1 2 0010 2 3 0011 3 4 0100 4 5 0101 5 6 0110 6 7 0111 7 8 1000 8 9 1001 9 10 1010 A 11 1011 B 12 1100 C 13 1101 D 14 1110 E 15 1111 F

Example 1 - Convert Binary to Decimal Convert the binary number 11011 to a decimal number. Solution: 11011 = 01234 1121202121 ×+×+×+×+× 27120816 =++++= . Hence, 102 271101 = . Example 2 - Convert Decimal to Binary Convert the decimal number 495 to a binary number.

Solution: We start by dividing the original number by 2 and keep the remainder. Then repeat the process until we can no longer perform a division.

495 / 2 = 247, remainder 1 247 / 2 = 123, remainder 1 123 / 2 = 66, remainder 1 66 / 2 = 33, remainder 0 33 / 2 = 16, remainder 1 16 / 2 = 8, remainder 0 8 / 2 = 4, remainder 0 4 / 2 = 2, remainder 0 2 / 2 = 1, remainder 0 1 / 2 = 0, remainder 1

Page 14: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

14 

 

Now read the binary number from the bottom to the top: 10 0001 0111. Hence, 210 0111 000110495 = .

Page 15: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

15 

 

Example 3 - Convert Hexadecimal to Decimal Convert the hexadecimal number 3B2 to a decimal number. Solution: 3B2 = 012 1621610163 ×+×+× 946217676816216112563 0 =++=×+×+×= 9462176768 =++= . Hence, 1016 9462B3 = .

Example 4 - Convert Decimal to Hexadecimal

Convert the decimal number 4598 to a hexadecimal number.

Solution: 4598/16 = 287 Remainder 6

287/16 = 17 remainder 15 (F)

17/16 = 1 Remainder 1

1/16 = 0 Remainder 1

= 11F6

Hence, 1610 6F114598 = .

Example 5 - Convert Hexadecimal to Binary

Convert the hexadecimal number 3C7D to a binary number. Solution Replace each hexadecimal number with its binary equivalent.

3 C 7 D 0011 1100 0111 1110

Hence, 216 1111100011110001D7C3 = .

Page 16: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

16 

 

Example 6 - Convert Binary to Hexadecimal Convert the binary number 1111110001000001 to a hexadecimal number.

Solution STEP 1: Starting from the right hand side, binary numbers are split into groups of four for conversion into hexadecimal:

1111 1100 0100 0001

STEP2: Replace each hexadecimal number with its decimal equivalent and then replace each decimal number with its hexadecimal equivalent.

{

{

{

{

{

{

{

{

11

0001

44

0100

C12

1100

F15

1111

Hence, 1111 1100 0100 00012 = 1641CF .

Note: With a little more practice you will be able to omit the ‘conversion to decimal’ stage and convert each group of four directly from binary to hexadecimal. You could of course use the table above to carry out this step.

1111 converts to 15 which is F in hexadecimal. 1100 converts to 12 which is C in hexadecimal. 0100 converts to 4. 0001 converts to 1.

Example 8 Convert the binary number 1101001011 to a hexadecimal number. Solution We note here that the binary number only contains 10 digits and so cannot be split evenly into groups of four as in the previous example. This is not a problem though as we start from the right hand side and split into groups of four

{

{

{

{

{

{

B11

1011

44

0100

33

11

Hence, 11010010112 = 16B34 .

Note: If you wish you can prefix the two digits in the leftmost group with two zeros to obtain a group of four, i.e.

{

{{{

{{

B11

1011

44

0100

33

0011 and then convert to hexadecimal.

Page 17: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

17 

 

Tutorial Exercises 

Factors, Multiples and Primes

(1) Find all the factors of: (i) 30; (ii) 100, (iii) 73 (iv) 84.

(2) What are the first three multiples of: (i) 7, (ii) 131?

(3) If 65 and 91 are two multiples of a particular number, and the number is not 1, what is the number?

(4) Find all the prime factors of 49.

(5) Find the prime factorisation of: (i) 84, (ii) 135, (iii) 1040.

(6) Find the following (i) HCF of 28 and 42, (ii) LCM of 28 and 42.

Modular Arithmetic

(7) Solve the following:

(i) (3 + 4) mod 5 (ii) (8 + 9) mod 13 (iii) (9 + 3) mod 12

(iv) (7 + 6) mod 12 (v) (5 × 3) mod 7 (vi) (2 × 10) mod 11

(vii) (5 × 6) mod 7 (viii) (12 × 11) mod 17 (ix) (25 × 61) mod 73

(8) Solve the following:

(i) (5 - 3) mod 7 (ii) (3 - 5) mod 7 (iii) (4 - 8) mod 12

(iv) (1 - 6) mod 7 (v) (3 - 4) mod 5 (vi) (1 - 10) mod 12

(9) Construct the tables for addition and multiplication modulo 5.

(10) Construct the tables for addition and multiplication modulo 2.

Page 18: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

18 

 

Modulo 2 Matrix Arithmetic

(11) Where possible evaluate sums and products, using modulo 2 arithmetic, of the following pairs of matrices.

(i) ⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡1101

,1001

(ii) ⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

101110111

,111111111

, (iii) ⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡1110

,01101001

.

Number Systems

(12) Convert the following decimal numbers to (a) their binary representations. (b) their hexadecimal representations. (i) 39 (ii) 73 (iii) 100 (iv) 359

(v) 111 (vi) 733 (vii) 1234 (viii) 2012

(13) Convert the following binary numbers to: (a) their decimal representations. (b) their hexadecimal representations (i) 11111111 (ii) 101011 (iii) 111000111 (iv) 1010010 (v) 111011100011 (vi) 10011010101 (vii) 100010001000 (viii) 110100111 (14) Convert the following hexadecimal numbers to: (a) their decimal representations. (b) their binary representations. (i)BD3 (ii) EEE (iii) 32 (iv) 50 (v) ABC (vi) BBC1 (vii) 2FC (viii) AA

Page 19: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

19 

 

Answers

Factors, Multiples and Primes

(1) (i) The factors of 30 are: 1, 2, 3, 5, 6, 10, 15, and 30.

(ii) The factors of 100 are: 1, 2, 4, 5, 10, 20, 25, 50, 100.

(iv) The factors of 73 are: 1 and 73 (73 is a prime number).

(iv) The factors of 84 are: 1, 2,3 ,4, 6, 7, 12, 14, 21, 28, 41, 84.

(2) (i) The first three multiples of 7 are: 7, 14 and 21.

(ii) The first three multiples of 131 are 131, 262 and 393.

(3) 13

(4) 7, 49

(5) (i) 7322 ××× , (ii) 5333 ××× , (iii) 1352222 ×××××

(6) (i) The factors of 28 are 28, 14, 7, 2, 1.

The factors of 42 are 42, 21, 14, 7, 6, 3, 2.

The first factor of 28 that is also a factor of 42 is 14. Hence, HCF(28, 42) = 14.

(ii) Multiples of 28 are: 28, 56, 84, 112, . . .

Multiples of 42 are: 42, 84, 126, . . .

Hence, LCM(28, 42) = 84.

Page 20: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

20 

 

Modular Arithmetic

(7) (i) 2, (ii) 4, (iii) 0, (iv) 1, (v) 1, (vi) 9, (vii) 2, (viii) 13, (ix) 65

(8) (i) 2, (ii) 5, (iii) 8, (iv) 2, (v) 4, (vi) 3

(9) Modulo 5 addition table:

+ 0 1 2 3 4

0 0 1 2 3 4

1 1 2 3 4 0

2 2 3 4 0 1

3 3 4 0 1 2

4 4 0 1 2 3

Modulo 5 multiplication table:

× 0 1 2 3 4

0 0 0 0 0 0

1 0 1 2 3 4

2 0 2 4 1 3

3 0 3 1 4 2

4 0 4 3 2 1

Page 21: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

21 

 

(10) Modulo 2 addition table:

+ 0 1

0 0 1

1 1 0

Modulo 2 multiplication table

× 0 1

0 0 0

1 0 1

Modulo 2 Matrix Arithmetic

(11) (i) ⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡++++

=⎥⎦

⎤⎢⎣

⎡+⎥⎦

⎤⎢⎣

⎡0100

11100011

1101

1001

⎥⎦

⎤⎢⎣

⎡=⎥

⎤⎢⎣

⎡×+××+××+××+×

=⎥⎦

⎤⎢⎣

⎡⎥⎦

⎤⎢⎣

⎡1101

1100111010011011

1101

1001

(ii) ⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

+++++++++

=⎥⎥⎥

⎢⎢⎢

⎡+

⎥⎥⎥

⎢⎢⎢

010001000

110111111101111111

101110111

111111111

⎥⎥⎥

⎢⎢⎢

×+×+××+×+××+×+××+×+××+×+××+×+××+×+××+×+××+×+×

=⎥⎥⎥

⎢⎢⎢

⎥⎥⎥

⎢⎢⎢

111111011111110111111111111111110111111111011111110111

101110111

111111111

Page 22: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

22 

 

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

++++++++++++++++++

=100100100

111011101111011101111011101

(iii) Cannot add these matrices as they have different sizes.

⎥⎦

⎤⎢⎣

⎥⎥⎥

⎢⎢⎢

1110

010001

⎥⎥⎥

⎢⎢⎢

⎡=

⎥⎥⎥

⎢⎢⎢

×+××+××+××+××+××+×

=100010

101110011010100010111001

Number Systems

(12) (a) Binary representation: (i) 100111 (ii) 1001001 (iii) 1100100 (iv) 101100111

(v) 1101111 (vi) 1011011101 (vii) 10011010010 (viii) 11111011100

(b) Hexadecimal representation:

(i) 27 (ii) 49 (iii) 64 (iv) 167

(v) 6F (vi) 2DD (vii) 4D2 (viii) 7DC

(13) (a) Decimal representation:

(i) 255 (ii) 43 (iii) 455 (iv) 82 (v) 3811 (vi) 1237 (vii) 2184 (viii) 423

(b) Hexadecimal representation:

(i) FF (ii) 2B (iii) 1C7 (iv) 52

(v) EE3 (vi) 4D5 (vii) 888 (viii) 1A7

Page 23: SCHOOL OF ENGINEERING & BUILT ENVIRONMENT Mathematics …€¦ · (ii) 13 is a prime number, since the only factors it has are 1 and 13. The prime numbers less than 25 are 2, 3, 5,

23 

 

(14) (a) Decimal representation:

(i) 3027 (ii) 3822 (iii) 50 (iv) 80 (v) 2748 (vi) 48065 (vii) 764 (viii) 170 (b) Binary representation:

(i) 101111010011 (ii) 111011101110 (iii) 110010 (iv) 1010000 (v) 101010111100 (vi) 1011101111000001 (vii) 1011111100 (viii) 10101010