EGR 270 Fundamentals of Computer Engineering - PowerPoint PPT Presentation

1 / 20
About This Presentation
Title:

EGR 270 Fundamentals of Computer Engineering

Description:

Reading Assignment: Chapter 1 in Logic and Computer Design ... kilobyte (kB): 210 = 1024 bytes. megabyte (MB): 220 = 1024 kB = (1024)(1024) = 1,048,576 bytes ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 21
Provided by: tcgo
Category:

less

Transcript and Presenter's Notes

Title: EGR 270 Fundamentals of Computer Engineering


1
EGR 270Fundamentals of Computer Engineering
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Reading Assignment Chapter 1 in Logic and
Computer Design Fundamentals, 4th Edition by Mano
  • Syllabus
  • Office Hours
  • Web page

2
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
3
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Chapter 1 Binary Systems
Digital System a system that works with
discrete elements of information (a set of
symbols) rather than with continuous signals as
in an analog system. This discrete information
is represented in binary form. Data processing
is carried out by means of binary logic elements
using binary signals. Quantities are stored in
binary storage elements (memory). Illustration
(analog system and binary system)
4
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Number Systems
1. Decimal Numbers Base 10, ten unique
digits (0,1,2,3,4,5,6,7,8,9), place values,
counting sequence, examples, LSD and MSD
2. Binary Numbers Base 2, two unique
digits (0 and 1), binary digit bit, place
values, counting sequence, examples, LSB and MSB
5
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Number Systems
3. Octal Numbers Base 8, eight unique
digits (0,1,2,3,4,5,6,7), place values,
counting sequence, examples, LSD and MSD
4. Hexadecimal Numbers Base 16, sixteen
unique digits (0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F),
place values, counting sequence, examples, LSD
and MSD
6
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Arithmetic Operations
Arithmetic operations in other bases are very
similar to the familiar operations that we have
always used in base 10.
Examples (of addition, subtraction, and
multiplications in various bases)
7
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Converting Between Bases
1. Converting to decimal expand by place value
as previously seen 2. Converting from decimal
A. For the integer portion Use repeated
division by the base (LSD is found
first) B. For the fractional portion Use
repeated multiplication by the base
(MSD is found first).
Examples
8
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
  • Converting between binary, octal, and hexadecimal
    simple replacement
  • A) Binary to octal

Examples
B) Binary to hexadecimal
Examples
9
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
  • Complements
  • Complements are commonly used to represent
    negative numbers and to
  • perform subtraction.
  • There are two types of complements which can be
    applied to any base

Where r base And a general number X might
consist of the digits X aaaaaaa.bbb n number
of digits before the decimal point m number of
digits after the decimal point
Formal definitions (r-1)s complement of X rn
r-m X ( rn 1-X if m 0)   rs
complement of X rn X (r-1)s complement
r-m (
(r-1)s complement 1 if m 0)
10
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Shortcut approach to finding complements 9s
comp subtract each digit from 9 10s comp 9s
comp 1 if m 0 1s comp replace each 0 with
1 and replace each 1 with 0 2s comp 1s comp
1 if m 0 2s comp (alternate method) Move
from the right until the first 1 is encountered.
Complement each bit after (but not including)
this 1.
Examples
11
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Representing negative numbers in 2s complement
form Negative numbers are typically represented
in 2s complement form in computers or other
digital systems.
  • Example int variables in C are represented
    using two bytes, where the MSB is
  • a sign bit. If the MSB 1, the number is
    negative and in 2s complement form.
  • What are the max and min values that can be
    stored?
  • What happens when an overflow occurs? (Show a
    sample program)

12
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
  • Binary Codes
  • Digital systems use 2-state devices that
    understand only 2 binary values (0 and 1). But
    we communicate using various symbols and methods.
    Codes are needed to allow us to communicate.
    Codes translate our language into the computers
    language and vice versa.

How many bits are needed to encode a set of
elements? In general,
N bits are needed to encode up to 2N elements
N log2(number of elements)
13
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Examples Determine the number of bits required
and develop a code to encode each of the
following A) 8 symbols B) 10000 symbols C)
the 366 days of the year in order D) the
366 days of the year using the month and day
14
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
  • byte group of 8 bits
  • word an n-bit code forms n-bit words. In a
    computer system, a certain number of bytes may
    form a word. For example, a 16-bit system might
    refer to words as consisting of 2 bytes.

Recall the system of SI prefixes
kilobyte (kB) 210 1024 bytes megabyte
(MB) 220 1024 kB (1024)(1024) 1,048,576
bytes gigabyte (GB) 230 1024 MB
1,073,741,824 bytes terabyte (TB) 240
1024 GB petabyte (PB) 250 1024 TB etc
Example How many address lines (bits) are
required in a computer that has 64 MB of RAM
(random access memory)? Example How many
address lines (bits) are required in a computer
that has 512 GB of RAM (random access memory)?
15
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Decimal Codes codes used to encode the digits 0
9 Several examples are shown below (Table 1-5
from the text) The BCD code is the most
common. Know the BCD code for tests. Other
codes will be given if needed.
16
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Gray Code The Gray code is a 4-bit binary code
(different from a BCD code in that it encodes all
16 4-bit combinations, not just 10
combinations). This code is interesting in that
successive code words only change by one
bit. This code is sometimes used with stepper
motors. Each time the code increases, only one
bit changes, and the stepper motor turns a
specified amount (angle).
17
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Application BCD codes are routinely used on
equipment to display numerical values. Digital
circuits work in binary, but people prefer to
read numbers in base 10, so BCD codes are used to
convert the data to base 10.
Example Show how a digital voltmeter would
convert binary information into BCD format,
including the use of binary-to-BCD converters and
BCD-to-7-segment decoders.
18
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Error Detection and Correction Codes Extra bits
are often added to codewords (using sometimes
complex schemes) so that when the word is
transmitted, the received can detect if errors
occurred in the transmission and possibly correct
some of the errors. Parity perhaps the
simplest error detection code involves the
addition of a parity bit Discuss even parity vs
odd parity
Example Show a BCD code with a trailing odd
parity bit.
Error Correction Codes - Discuss.
Example Show a simple 2-bit code with extra
bits added for error correction.
19
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
Alphanumeric codes Used to encode keyboard
symbols and control characters. ASCII, EBCDIC,
and Unicode are common alphanumeric codes. The
ASCII code is shown below in Table 1-5 from the
text. Since the ASCII code is a 7-bit code, a
leading 0 bit or a parity bit can be added to
form an 8-bit code (byte).
Example Write the word Byte using an ASCII
code with an even leading parity bit.
20
Lecture 1 EGR 270 Fundamentals of
Computer Engineering
  • Alphanumeric codes
  • ASCII
  • 7 bits, 27 128 characters
  • With a leading 0, can be represented by 1 byte
    (two hexadecimal digits)
  • Example 010000012 4116 A
  • EBCDIC
  • 8 bits, 28 256 characters
  • Unicode
  • 16 bits, 216 65,636 characters
  • Can be represented by two bytes (four
    hexadecimal digits)
  • Provides support for international alphabets
    (and math symbols)
  • See texts companion site for more information
    www.prenhall.com/mano/
  • The first 95 codes match the ASCII code with
    two leading hexadecimal digits
  • Example 00000000010000012 004116 A
Write a Comment
User Comments (0)
About PowerShow.com