1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6.

Slides:



Advertisements
Similar presentations
Data Representation COE 202 Digital Logic Design Dr. Aiman El-Maleh
Advertisements

COMP3221: Microprocessors and Embedded Systems--Lecture 1 1 COMP3221: Microprocessors and Embedded Systems Lecture 3: Number Systems (I)
CS 61C L02 Number Representation (1)Harvey / Wawrzynek Fall 2003 © UCB 8/27/2003  Brian Harvey ( John Wawrzynek  (Warznek) (
Data Representation Computer Organization &
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Data Representation COE 205
Representations Example: Numbers –145 –CVL – –91 –
Connecting with Computer Science, 2e
Agenda Shortcuts converting among numbering systems –Binary to Hex / Hex to Binary –Binary to Octal / Octal to Binary Signed and unsigned binary numbers.
CS 61C L02 Number Representation (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C.
Number Representation (1) Fall 2005 Lecture 12: Number Representation Integers and Computer Arithmetic.
Data Representation ICS 233
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Data Representation in Computers
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Information Representation and Number Systems BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Binary Numbers.
Computer Science 101 Number Systems. Humans Decimal Numbers (base 10) Decimal Numbers (base 10) Sign-Magnitude (-324) Sign-Magnitude (-324) Decimal Fractions.
1 Lecture 2: Number Systems Binary numbers Base conversion Arithmetic Number systems  Sign and magnitude  Ones-complement  Twos-complement Binary-coded.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 1, 2004 Lecture Number: 4.
Lecture 5.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 29, 2004 Lecture Number: 26.
Introduction to Computer Design CMPT 150 Section: D Ch. 1 Digital Computers and Information CMPT 150, Chapter 1, Tariq Nuruddin, Fall 06, SFU 1.
Information Representation. Digital Hardware Systems Digital Systems Digital vs. Analog Waveforms Analog: values vary over a broad range continuously.
1 COMS 161 Introduction to Computing Title: Numeric Processing Date: October 20, 2004 Lecture Number: 23.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 10, 2004 Lecture Number: 8.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 13, 2004 Lecture Number: 9.
Dr. Ahmed Telba EE208: Logic Design Lecture# 1 Introduction & Number Systems.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
CISC1100: Binary Numbers Fall 2014, Dr. Zhang 1. Numeral System 2  A way for expressing numbers, using symbols in a consistent manner.  " 11 " can be.
AEEE2031 Data Representation and Numbering Systems.
1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 3, 2004 Lecture Number: 5.
Digital Representations ME 4611 Binary Representation Only two states (0 and 1) Easy to implement electronically %0= (0) 10 %1= (1) 10 %10= (2) 10 %11=
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
1 COMS 161 Introduction to Computing Title: Computing Basics Date: September 8, 2004 Lecture Number: 7.
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Data Representation COE 301 Computer Organization Dr. Muhamed Mudawar
CSE370, Lecture 2 Lecture 2: Number Systems  Logistics Webpage is up! HW1 is posted on the web in the calender --- due.
Number Systems. The position of each digit in a weighted number system is assigned a weight based on the base or radix of the system. The radix of decimal.
Digital logic COMP214  Lecture 2 Dr. Sarah M.Eljack Chapter 1 1.
Data Representation COE 301 Computer Organization Prof. Muhamed Mudawar College of Computer Sciences and Engineering King Fahd University of Petroleum.
Dr. ClincyLecture 2 Slide 1 CS Chapter 2 (1 of 5) Dr. Clincy Professor of CS Note: Do not study chapter 2’s appendix (the topics will be covered.
Data Representation COE 308 Computer Architecture
Chapter 8 & 11: Representing Information Digitally
Lec 3: Data Representation
Data Representation.
Digital Logic and Computer Organization
CHAPTER 1 : INTRODUCTION
Logistics Always read the Calendar at
CSE 102 Introduction to Computer Engineering
Chapter 3 Data Representation
COMS 161 Introduction to Computing
Chapter 2 Data Representation.
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Lecture 2: Number Systems
COMS 161 Introduction to Computing
COMS 161 Introduction to Computing
Data Representation COE 308 Computer Architecture
Presentation transcript:

1 COMS 161 Introduction to Computing Title: The Digital Domain Date: September 6, 2004 Lecture Number: 6

2 Announcements Homework 3 –Due on Friday, 09/10/04

3 Review Digital information –Advantages Number system –Non-positional –Positional Decimal Octal Binary

4 Outline Binary numbers

5 Binary Number System Since binary digits have two possible values they are called bits –They only contain a little “bit” of information –Numbers represented in binary form will (most likely) require more digits (bits) than the decimal form

6 Binary Number System Number of Bits Number of Values To represent more information –Lump together multiple bits called strings

7 Binary Number System In general number of values = 2 number of bits How does 1 bit represent 2 values? –It can have one of two values 0, 1 –Can represent two colors, black and white –0: black –1: white Can represent two numbers: 0, 1

8 Binary Number System How do 2 bits represent 4 values? Bit PatternNumeric Value Item Represented 000Black 011White 102Red 113Green

9 Binary Number System How do 3 bits represent 8 values? Bit PatternNumeric ValueItem Represented 0000Black 0011White 0102Red 0113Green 1004Blue 1015Purple 1106Magenta 1117Sky blue

10 Binary Number System How do 4 bits represent 16 values? Bit PatternValueBit PatternValue

11 Binary Number System Bit patterns and numeric values are consistent with other slides –Acceptable to add leading 0’s if desired

12 Binary Number System We can represent the non-negative numbers (unsigned number) How about representing negative numbers? –Let the left most bit represent the sign (+, -) of the number –Called signed magnitude representation –[s][mag] 0 – 2 number of bits - 1

13 Signed Magnitude –One less bit to represent the magnitude

14 Signed Magnitude Problems –Two values of 0 More difficult to detect than one value of 0 –Incorrect arithmetic 2 – 1 = 2 + (-1) = 1

15 Two’s Complement Representation Sign bit in a sense –Positive numbers The leading bit (left most) is zero The same as signed magnitude –Negative numbers The leading bit is one Defined so that when added to their corresponding positive number the answer is zero

16 Bit PatternValueBit PatternValue Two’s Complement Representation

17 Two’s Complement Representation Problems with signed magnitude representation are solved with the two’s complement representation –There is only value of zero –Arithmetic is correct Solution is in two’s complement form 2 – 1 = 2 + (-1) = 1

18 Binary Encoding Unsigned binary numbers are useful when labeling things Common grouping –4 bits: nibble –8 bits: byte One byte represents 256 different values or items

19 Binary Number System –Letters in the English language A = = B = = … Z = = … a = = … Z = = Numbers are still left over for punctuation

20 Binary Number System Precision –The number of bits used to represent an item Letter: precision of 8 bits Integer (whole number): precision of 32 or 64 bits –Always finite Computers have finite precision –Presents some limitations

21 Hexadecimal Number System Sometimes called hex –Positional,base-16 system –Each digit is multiplied by a power of 16 –Sixteen unique symbols (digits) 0, 1, 2, …, 15 Symbol a or A for 10 Symbol b or B for 11 Symbol e or E for 14 Symbol c or C for 12 Symbol f or F for 15 Symbol d or D for 13

22 Hexadecimal Number System A hex number can represent 16 different items –Equivalent to 4 bits –Makes it easy to convert between binary and hex Group bits by 4’s from the left end Substitute the hex symbol –90 10 = = 5A 16 »Is the base 16 really needed? –66 10 = = 42 16

23 Hexadecimal Number System Use the backwards conversion to convert hex to binary –One hex digit is equivalent to 4 bits –Substitute the binary nibble Always start at the right end Add zeros to the left end as necessary to fill in 4 bits

24 Hexadecimal Number System HEXDECBIN A B C D E F151111

25 Digitization The process of converting analog information into binary –Discrete forms are unambiguous Text and numbers are discrete –Conversion of discrete to digital Come up with a mapping –As we did with the letters

26 Binary Coded Decimal Integers (whole numbers) –One mapping is to use its binary equivalent Binary Coded Decimal (BCD) –0 10 = –1 10 = – … –9 10 = Need a minimum of 4 bits to represent 10 different values –Some 4 bit quantities are wasted

27 Binary Coded Decimal String of decimal digits –Each decimal digit is represented by 4 bits –The number of bits needed to represent different numbers vary –Performing arithmetic is complicated

28 Digitizing Analog Information Two steps –Sampling the information Select discrete samples that represents the information –Quantizing the samples Discrete samples are measured Encoded into a binary representation

29 Digitizing Analog Information Sampling –In time or space (picture) Quantizing –Approximating the measured value

30 Images are digitized using a two step process Sampling the continuous tone image Quantizing the samples Digitizing Images

31 Sample image by pixel resolution Spatial Sampling Sample two- dimensional space Sampling Images

32 All gray values in each sample are averaged Quantizing Images

33 Different amount of sampling Quantizing Images

34 Different amount of sampling Quantizing Images

35 Different amount of sampling Quantizing Images