introduction to number systems - de montfort...
TRANSCRIPT
Introduction to Number SystemsJ. Dimitrov
Software Technology Research Laboratory (STRL)
De Montfort University
Leicester, UK.
J.Dimitorv, STRL, DMU, [email protected] – p. 1
Overview
Personal introduction
Module outlinetopicsassessmentresources — the module web site
Introduction to Number Systems
J.Dimitorv, STRL, DMU, [email protected] – p. 2
ELEC1099 — Lecturers
Jordan [email protected]
Hawthorn H00.22 (restricted area — STRL)ext. 6619
Eric [email protected]
Gateway House GH5.11ext. 8463
Gateway House GH5.73ext. 7498
J.Dimitorv, STRL, DMU, [email protected] – p. 3
Introduction
Teaching by lectures, tutorials and labsone lecture per week — Q0.12one tutorial — see timetableone lab — Q1.01 on LogicWorks
TopicsHardware — logic gates, sequential logic,memory, ALUMotorola 6805 microcontroller —Assembler and testbed
Many materials are available on Eric’s web sitehttp://www.cse.dmu.ac.uk/~eg/elec1099/
Handouts from the Support (Advice) CenterJ.Dimitorv, STRL, DMU, [email protected] – p. 4
Assesment
Course WorkLogic Works design (see the website forinstructions)30%
Two multiple choice phase testsclearly stated in your timetable!35% each
J.Dimitorv, STRL, DMU, [email protected] – p. 5
Resources
WebsitesEric’shttp://www.cse.dmu.ac.uk/~eg/elec1099/
Ian’shttp://www.cse.dmu.ac.uk/~sexton/WWWPages/cs2.html
BookUnderstanding Small Microcomputershttp://www.cse.dmu.ac.uk/~sexton/WWWPages/1099/book.pdf
Booklet from the Support (Advice) center —get your copy today!
J.Dimitorv, STRL, DMU, [email protected] – p. 6
Introduction to Number Systems
God made the natural numbers only; allelse is the work of man.
Kronecker (1823 – 1891)
As with any written system, numbers need analphabet and a grammar.
Example: The number 4725 is a “word” made of4 characters using the “letters” 2, 4, 5 and 7.
The alphabet is the collection of digits and thegrammar is the placement system (arabicnumbers) as opposed to (roman numbers IV, V,VI, etc.)
J.Dimitorv, STRL, DMU, [email protected] – p. 7
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
Decimal (base 10) — obvious answer!
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
Decimal (base 10) — obvious answer!
Dozen (base 12)
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
Decimal (base 10) — obvious answer!
Dozen (base 12)
Pounds and ounces (base 16)
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
Decimal (base 10) — obvious answer!
Dozen (base 12)
Pounds and ounces (base 16)
Date and time (bases 60, 24, 7)
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Question: What Number Systems are we usingour day-to-day life?
Decimal (base 10) — obvious answer!
Dozen (base 12)
Pounds and ounces (base 16)
Date and time (bases 60, 24, 7)
etc ...
J.Dimitorv, STRL, DMU, [email protected] – p. 8
Introduction to Number Systems
Let us have an n digit number N ∈ N and wehave fixed the base b.
Base b implies that our digits aredj = 0, 1, 2, ..., b − 1.
N = dn−1dn−2...d1d0(b).
N = dn−1×bn−1+dn−2×bn−2+...+d1×b1+d0×b0.
where a0 = 1 for any a ∈ N.
Example: N = 4725(8), thereforeN = 4 × 83 + 7 × 82 + 2 × 81 + 5 × 80 = 2517.
J.Dimitorv, STRL, DMU, [email protected] – p. 9
Binary Numbers
Computers use Binary (base 2).
Base b = 2.
Digits dj = 0, 1.
N = dn−1×bn−1+dn−2×bn−2+...+d1×b1+d0×b0.
Example:N = 10011101(2) = 1 × 27 + 0 × 26 + 0 × 25 + 1 ×
24 + 1 × 23 + 1 × 22 + 0 × 21 + 1 × 20 = 157
J.Dimitorv, STRL, DMU, [email protected] – p. 10