CSC 4100 Syllabus - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

CSC 4100 Syllabus

Description:

Encoding: a binary representation of alphabet. ... Remember that we added one digit in sign number representation and 4 digits in BCD. ... – PowerPoint PPT presentation

Number of Views:45
Avg rating:3.0/5.0
Slides: 29
Provided by: tgto
Category:

less

Transcript and Presenter's Notes

Title: CSC 4100 Syllabus


1
CSC 4100 Syllabus
  • 1st Week Basic Data Representation(CH.1)
  • 2nd Week Logic Design(Ch2)
  • 3rd Week Logic Design Basic Components.
  • 4th Week Basic Component
  • 5th Week Simple Calculations.
  • 6th Week Addressing and Data Organization.
  • 7th Subroutine Calling Mechanisms.
  • 8th Representing Integers.
  • 9th Floating Point Numbers
  • 10th Instruction Representation.
  • 11th Instruction Interpretation and Translation
    process.
  • Device Communication and Interrupts.

2
Contact information
  • Instructor Dr. T.G.Towfic
  • Room 454 State Hall
  • E-Mail gtowfic_at_cs.wayne.edu
  • Tel(313)577-0731.
  • Grader Yu Zhang
  • Room 468 State Hall
  • E-mail Zhangyu_at_cs.wayne.edu.

3
Important Dates
  • 1st quiz Thursday May 27 1999..630-730
  • First Exam Th. June 03 1999.. 530-735.
  • 2nd quiz Tuesday June 29 1999..630-730.
  • 2nd ExamTuesday July 13 1999.. 530-735
  • 3rd quizTuesday July 27 1999, 630-730.
  • Final ExamThursday August 3rd ,530-735

4
  • Grading Policy
  • 25 each exam.(total 2 2550).
  • 5 each quiz( 5315)
  • 35 Assignments( 5 assignments each term,
    including programming assignments).
  • Office hours
  • Instructor T/Th 400-530
  • Grader M/Wed. 430-530

5
5/11/99
  • Data Representation
  • Number Encoding.
  • Character encoding.

6
Definitions
  • Abstraction Capturing the general properties of
    things, while leaving out the details.
  • Encoding a binary representation of alphabet.
  • Unit symbol and Grouping symbols Each grouping
    of symbol represent a collection of units.
  • Digits are grouping symbols used in positional
    numbering systems.
  • Most Significant and least significant bitsMSB
    represent the highest power of two in a binary
    representation. LSB represent 20.

7
  • Sign bit holds the sign information in a sign
    magnitude representation.
  • Code is a set of encoding.

8
Positional Numbering Systems
  • Must Contain
  • (1) Radix(Base). We will call it r
  • (2) alphabet We will call it d
  • Then a sequence of di(i0,1,n-1) for a given
    alphabet with n digits, is represented as
  • dn-1 d1 d0
  • In Radix form this is given as
  • dn-1 . rn-1 ..d0 . r0

9
  • Radix(Base)

Decimal r10 Maximum digit 9
Octal r8 Max. Digit 7
Hexadecimal r16 Max. Digit 15(F)
Binary r2 Max. digit1
10
Examples
  • 964 (1704)8
  • (11010100001)2 (3241)8
  • (4BF)16 (010010111111)2

11
Radix Conversion
  • I. Binary to others
  • (1) Divide by number of digits(start from
  • Least Significant Digit, LSD)
  • (A) Octal 3,(B) Hexa. 4,(C) Dec.4
  • E.g. (1101000101)2
  • (a) Decimal 0011 0100 0101
    (345)10345
  • (b) Octal 001 101 000 101
    (1505)8
  • (C) Hexa ?

12
  • II. Others to binary
  • (1) Choose number of bits according to Base
  • Hexa Octal 4bits, Octal 3
  • (2) use number of bits in (1) to convert each
    digit to binary.
  • Ex (ABC)16 (101010111100)2
  • (7762)8(111111110010)2
  • 9899 (1001100010011001)2

13
  • III Others to decimals
  • Use positional notation
  • n-1
  • ? di . ri
  • i o

4 Dec.
r
r 8 octal
n total number of digits to be converted
r16 Hexa.
14
  • Ex (AB23)16 10(16)311(16)22(16)1

  • 3(16)0 43811..(n4)
  • (774)8 7(8)2 7(8)1 4(8)0 508 ..(n3)
  • (101111)2 ?

15
  • IV Decimal to others
  • (1) divide number by Base.
  • (2) separate quotient from reminder.
  • (3) Continue until quotient less than Base.
  • (4) arrange reminders as LSD( which has a less
    power than others) to the left.

16
  • Example
  • 995 TO Hexa.
  • Decimal quotient
    Reminder
  • 995/16 62 3
    (160) LSD
  • 62/16 3
    14(161)
  • 14/16 0
    14(162)
  • Result (EE3)16

17
  • V. Fraction of Any Base to Decimal
  • Use positional number equation for decimal
  • n
  • ? di . r -i
  • i 1

18
  • Ex.
  • 0.AAC16 1016-1 1016-21216-3
  • 0.6669921
  • 0.76728 78-1 68-278-328-4
  • ?

19
  • VI. Decimal fraction to any base
  • (1) multiply by Base.
  • (2) separate whole number from fraction.
  • (3) multiply fraction by base until fraction
    Continue until fraction gt 0.
  • (4) arrange whole numbers as LSD( this time
    last obtained (why)!) to left .

20
  • Example
  • 0.9878 into Hexa.
  • Decimal Whole number Fraction
  • 0.987816 15
    0.8048
  • 0.804816 12
    0.8768
  • 0.876816 14
    0.0288
  • Result rounded to three digits (FCE)16

21
Number Encoding
22
  • Examples
  • (I) sign bit representation
  • 28 is 0 11100
  • -28 is 111100
  • Notice that we followed the positional number
    system.
  • (II) BCD
  • 28 is 101000101000
  • -28 is 101100101000
  • notice that,here, we represent each digit by
    iots binary representation( we dont follow
    positional number system).

23
  • (III) 5-bit 2s Complement
  • (1) 28 as a position number system
  • 11100
  • (2) we take complement
  • 00011
  • (3) we add 1 to complement
  • 00011 1 00100

24
  • General notes on 2s complement
  • (1) we dont need extra bits to be added to the
    number. Remember that we added one digit in sign
    number representation and 4 digits in BCD.
  • (2) in genera 2s complement of n bit of a number
    X is
  • representation 2n - X
  • thus 2s complement of 28 given 5 bits 25 - 28
    4(00100)
  • Q How do we recognize compliments from numbers?
    For example how do we know that 00100 is not the
    number 4 but it is -28?
  • Hint in 2s compliment numbers with n bit
    representation, encoded values can only be in the
    range -2n-1 and 2n-1 - 1.

25
Character Encoding
  • Character

26
ASCII CHARACTER SET
  • Seven digit for all characters(printable and
  • non-printable)
  • Advantages (1)Capital letters and small letters
    can be recognized easily since they only differ
    in the 2th bit.
  • (2) As we normally have 8 bit computers, the
    extra 8th bit can be used to store extra symbols
    (which are not represented by ASCII code) like
    Greek alphabet and graphical symbols.
  • (3) control characters are easily recognized as
    it always starts by 001.
  • (4) easily encoded by simply dividing strings to
    7 bit subsequent and matching each subsequent
    with its corresponding ASCII representation.

27
  • Disadvantage of fixed character representation
  • does not take into consideration number of
    occurrence of each digit(frequency) in
    a word. In fact it is reasonable to assume that
    digits with more frequency should be represented
    with smaller number of digits so that we can save
    space.

28
Assignment
  • Write a computer program (Use any convenient
    language) to perform conversion from decimal to
    all other bases. Test your program with Binary,
    Octal and Hexadecimal.
  • Deadline Thursday 27th May 1999
  • A Floppy of source program with sample test data
    is required.
Write a Comment
User Comments (0)
About PowerShow.com