15
Introduction to Number Systems J. Dimitrov [email protected] Software Technology Research Laboratory (STRL) De Montfort University Leicester, UK. J.Dimitorv, STRL, DMU, [email protected] – p. 1

Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

Embed Size (px)

Citation preview

Page 1: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

Introduction to Number SystemsJ. Dimitrov

[email protected]

Software Technology Research Laboratory (STRL)

De Montfort University

Leicester, UK.

J.Dimitorv, STRL, DMU, [email protected] – p. 1

Page 2: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

Overview

Personal introduction

Module outlinetopicsassessmentresources — the module web site

Introduction to Number Systems

J.Dimitorv, STRL, DMU, [email protected] – p. 2

Page 3: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

ELEC1099 — Lecturers

Jordan [email protected]

Hawthorn H00.22 (restricted area — STRL)ext. 6619

Eric [email protected]

Gateway House GH5.11ext. 8463

Ian [email protected]

Gateway House GH5.73ext. 7498

J.Dimitorv, STRL, DMU, [email protected] – p. 3

Page 4: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 5: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 6: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 7: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 8: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

Introduction to Number Systems

Question: What Number Systems are we usingour day-to-day life?

J.Dimitorv, STRL, DMU, [email protected] – p. 8

Page 9: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 10: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 11: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 12: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 13: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 14: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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

Page 15: Introduction to Number Systems - De Montfort Universityjordan/teaching/elec1099/IntroNumberSystems.pdfBook Understanding Small ... Introduction to Number Systems God made the natural

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