Vous êtes sur la page 1sur 3

Discrete Mathematics 2002 Lecture 1, 23-July-2002

DISCRETE MATHEMATICS, 2002


• Lecturer: Simon Smith (Rm
B2.12)
• Text: Discrete Mathematics for
Computing by Peter Grossman –
second edn

• Assessment: two 45-min tests (each 20%)


and a 3-hour exam (60%).
• Tests: in lectures on Friday 30 August and
27 September
1

Tutorials and Web Support


• Tutorials: 4 tute groups:
Mon 10am, Tues 4pm, Thurs 1pm & 2pm
• You need to sign up ASAP for a tutorial –
tutes start in Week 2
• Web Page: www.bendigo.latrobe.edu.au/
mte/maths/staff/smith/discrete/
• Copies of PowerPoint slides used in lectures
are available at this web site (usually the
day before the lecture)
2

2.1 Real Numbers and the


Decimal Number System
• Real Numbers – are the familiar numbers of
everyday life. Important types are:
∗ Natural numbers 1, 2, 3, 4, 5, ….
∗ Integers 0, 1, –1, 2, –2, 3, –3, ….
∗ Rational numbers – can be written as
m/n, where m,n are integers and n is not 0
– e.g. 2/5, –13/721
∗ Irrational numbers – are the real nos that
aren’t rational
3

1
Discrete Mathematics 2002 Lecture 1, 23-July-2002

Rational & Irrational Numbers


• Every rational no. can be written as either a
terminating decimal (e.g. 1¾ = 1.75) or as a
recurring decimal (e.g. 2/3 = 0.666666….)
• The irrational nos are the real nos whose
decimal expansions neither terminate nor
recur. Examples include:
√2 = 1.41421356237309504880168872….
π = 3.14159265358979323846264338….
4

Place Value and Base


• A number such as 6245.37 is in decimal
form, with each digit having a place value
• In decimal form, place values are powers of
10 – so the decimal system is said to have a
base of 10
• Note that base 10 requires ten digits (i.e.
0–9)

2.2 The Binary Number System


• Simplest number system is base 2, or binary
• Uses the 2 digits (“bits”) 0 and 1
• Used exclusively in computers (ON/OFF
switches, magnetised/unmagnetised
memory elements)
• A typical binary number is 1011.1012
• The subscript 2 denotes the base – the base
should be included if it is not 10
6

2
Discrete Mathematics 2002 Lecture 1, 23-July-2002

Converting Binary to Decimal


• Example: Convert 1011.1012 to decimal
• Solution: 1011.1012
= (1×23) + (0×22) + (1×21) + (1×20)
+ (1×2–1) + (0×2–2) + (1×2–3)
= 8 + 2 + 1 + 0.5 + 0.125
= 11.625
• Exercise: Convert 110001.0112 to decimal
7

2.3 Conversion from Decimal to


Binary
• We’ll begin by converting integers
• Example: Convert 183 to binary
Solution: Note that the powers of 2 are
1, 2, 4, 8, 16, 32, 64, 128, 256, 512, ….
Now write 183 using just these powers.
Thus 183 = 128 + 55
= 128 + 32 + 23 = 128 + 32 + 16 + 7
= 128 + 32 + 16 + 4 + 2 + 1 = 101101112
8

Decimal to Binary - A Better Way


• Previous method is awkward for large nos.
• A better method is to repeatedly divide by 2,
writing down the quotient and remainder at
each step, until the quotient is zero.
• Now write down the remainders in reverse
order – this is the binary form of the integer
• Example: Convert 183 to binary
• Exercise: Convert 212 to binary
Answer: 212 = 110101002
9

Vous aimerez peut-être aussi