(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 

Slides:



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

The Binary Numbering Systems
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Lecturer: Omid Jafarinezhad Sharif University of Technology Department of Computer Engineering 1 Fundamental of Programming (C) Lecture 2 Number Systems.
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, Java Version, Third Edition.
Digital Fundamentals Floyd Chapter 2 Tenth Edition
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
Connecting with Computer Science, 2e
Level ISA3: Information Representation
Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
The Binary Number System
CISC1400: Binary Numbers & Computer Fall 2011, Dr. Zhang 1.
Mantıksal Tasarım – BBM231 M. Önder Efe
Binary Number Systems.
Connecting with Computer Science 2 Objectives Learn why numbering systems are important to understand Refresh your knowledge of powers of numbers Learn.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Introduction to Digital Logic Design
Data Representation Number Systems.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Computer Architecture I: Digital Design Dr. Robert D. Kent Lecture 1 – Part B Data, Representation & Numeracy.
CS231 Fundamentals1 Fundamentals What kind of data do computers work with? – Deep down inside, it’s all 1s and 0s What can you do with 1s and 0s? – Boolean.
Numeral Systems Subjects: Numeral System Positional systems Decimal
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
Computers Organization & Assembly Language
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
CSU0014 Assembly Languages Homepage: Textbook: Kip R. Irvine, Assembly Language for Intel-Based Computers,
Binary Numbers.
Summer 2014 Chapter 1: Basic Concepts. Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Chapter Overview Welcome to Assembly Language.
Click to edit Master title style Click to edit Master text styles –Second level Third level –Fourth level »Fifth level 1 Today’s Topics How information.
Logic and Digital System Design - CS 303
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
1 Digital Systems and Binary Numbers EE 208 – Logic Design Chapter 1 Sohaib Majzoub.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
1 Week 2: Binary, Octal and Hexadecimal Numbers READING: Chapter 2.
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.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Data Representation, Number Systems and Base Conversions
AEEE2031 Data Representation and Numbering Systems.
June 10, 2002© Howard Huang1 Number systems To get started, we’ll discuss one of the fundamental concepts underlying digital computer design:
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
Chapter 1: Binary Systems
Logic Design EE-2121 Manesh T. Digital Systems  Introduction  Binary Quantities and Variables  Logic Gates  Boolean Algebra  Combinational Logic.
Number Systems and Computer Arithmetic Winter 2014 COMP 1380 Discrete Structures I Computing Science Thompson Rivers University.
CSC 331: DIGITAL LOGIC DESIGN COURSE LECTURER: E. Y. BAAGYERE. CONTACT: LECTURE TIME: 15:40 – 17:45 hrs. VENUE: SP-LAB.
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
Computer Math CPS120 Introduction to Computer Science Lecture 7.
CHAPTER 3 BINARY NUMBER SYSTEM. Computers are electronic machines which operate using binary logic. These devices use two different values to represent.
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.
Prepared By: Norakmar Binti Mohd Nadzari CHAPTER 2 ARITHMETIC AND LOGIC UNIT.
Unit 1 Introduction Number Systems and Conversion.
Chapter 1 Digital Systems and Binary Numbers
Invitation to Computer Science, C++ Version, Fourth Edition
Number Systems and Binary Arithmetic
What is a byte? What is it? How would you use it?
Data Representation Binary Numbers Binary Addition
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
University of Gujrat Department of Computer Science
Invitation to Computer Science, Java Version, Third Edition
BEE1244 Digital System and Electronics BEE1244 Digital System and Electronic Chapter 2 Number Systems.
Overview Digital Systems and Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic & Design Lecture 02.
Number Systems Lecture 2.
Chapter Four Data Representation in Computers By Bezawit E.
Presentation transcript:

(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information  Boolean algebra  Logical expressions and circuits

(2.2) Information Technology Magnitude Terms  Large – kilo=1,000 – mega=1,000,000 – giga=1,000,000,000 – tera=1,000,000,000,000 – peta=1,000,000,000,000,000  Small – milli=1/1,000 – micro=1/1,000,000 – nano=1/1,000,000,000 – pico=1/1,000,000,000,000 – femto=1/1,000,000,000,000,000

(2.3) Logarithms  Because of these great differences in magnitudes, often use logarithms to represent values – a logarithm is the power to which some base must be raised to get a particular value For example, the base 10 logarithm of 1000 (written log ) is 3, since 10 3 = 1000

(2.4) Logarithm Scale Graphs  Graphs often use a logarithmic scale on one axis so that the data fit on a reasonable size graph

(2.5) Logarithm Scale Graphs (continued)  The problem with this is that such graphs lose the impact of how rapidly the magnitudes change

(2.6) Binary Numbers  Digital systems operate using the binary number system – only two digits, 0 and 1 – can be represented in computer several ways » voltage high or low » magnetized one direction or another – each digit is a binary digit, or bit – referred to as being in base 2  Magnitudes of binary numbers determined using positional notation, just like decimal – = 1* * * *10 3 – = 1* * * * * *2 5

(2.7) Converting Between Number Systems  To convert binary to decimal, simply perform arithmetic in base 10 – = 1* * * * * *2 5 = = 37  To convert decimal to binary, divide the decimal value by 2 – remainder is rightmost digit of binary number – repeat on quotient 37/2 = 18remainder 1 18/2 = 9remainder 0 9/2 = 4remainder 1 4/2 = 2remainder 0 2/2 = 1remainder 0 1/2 = 0remainder 1 binary number is

(2.8) Converting Between Number Systems (continued)  Alternatively, build a table of powers of 2, write 1 by largest magnitude less than value to convert, then subtract that from the number and repeat until get to 0 – produces number most significant digit first

(2.9) Binary Arithmetic  What happens if you add two digits in base 10 and get a result greater than 9? – generate a carry  Same thing happens if you add two binary digits and get a result greater than

(2.10) Binary Arithmetic (continued)  To do addition, we need just one more piece of information  Then, we can add two binary numbers by using the four cases on the previous slide and the identity above carry addend addend result

(2.11) Binary Arithmetic (continued)  Subtraction uses a similar idea, that of a borrow from the next column left when we’re trying to subtract a larger digit from a smaller  With binary digits, the same thing holds

(2.12) Binary Arithmetic (continued)  Consider a couple examples

(2.13) Binary Arithmetic (continued)  Multiplication is simple – 0 times anything is 0 – 1 times anything is that thing again  For example x

(2.14) Binary Arithmetic (continued)  For division, the divisor is either – less than or equal to what it’s dividing into, so the quotient is 1 – greater than what it’s dividing into, so the quotient is 0  For example quotient remainder

(2.15) Octal and Hexadecimal  Reading and writing binary numbers can be confusing, so we often use octal (base 8) or hexadecimal (base 16) numbers – group binary number into sets of 3 (octal) or 4 (hex) bits, then replace each group by its corresponding digit from the tables – to convert back to binary, just replace each octal or hex digit with its binary equivalent

(2.16) Real Numbers  Previous numeric values were all integers  We commonly use real numbers (with decimal point and fractional part) as well – = 2x x x x x10 -3  Same idea holds for binary numbers – = 1x x x x x x x x2 -3  Can also write these in scientific notation – x 10 2 – x 2 5  Referred to as floating point numbers in “computer speak”

(2.17) Holding Binary Numbers in a Computer  Computer memory is organized into chunks of 8 bits, called bytes  The range of values that an integer can hold depends on how many bytes of memory are used – 1 byte – 2 bytes-32, ,767 – 4 bytes-2,147,483, ,147,483,647  Floating point numbers usually have 4 or 8 byte representations – separate exponent and magnitude magnitude exp sign

(2.18) Representing Text  Text is an example of discrete information – like integers - there are only certain values that are allowed  Representing text in a computer is simply a matter of defining a correspondence between each character and a unique binary number – called a code – need different numbers for upper and lower case representation of same letter – need representation for digits as characters – want A to be less than B so it’s possible to alphabetize character information

(2.19) Representing Text (continued)  American Standard Code for Information Interchange (ASCII) code is standard for most computers – 7-bit code (128 possible characters) – stored in memory as single byte  Won’t represent non-Roman characters easily – new 16-bit UniCode will

(2.20) Representing Analog Information  If the data we want to represent in a computer is not discrete but continuous, need to turn it into a sequence of numerical values by sampling – examples are sound, pressures, images, video – sequence of samples approximates original signal

(2.21) Representing Analog Information (continued)  Values used for the samples determine precision of measurement – too coarse a division of the range of possible input values yields a poor approximation – too fine a division wastes storage space (since more bits needed for each sample) » 8 bits, 256 levels; 16 bits, 65,536 levels

(2.22) Representing Analog Information (continued)  Number of samples in given time period is called the frequency or sample rate – defined by number of measurements per second (Hz) – sample rate needed depends on how rapidly the input signal changes

(2.23) Representing Analog Information (continued)  Need to trade off sampling rate and precision to achieve acceptable approximation without letting resulting digital data get too large  Audio CD – 44.1 KHz sampling rate – 16 bit precision – 1 minute of CD-quality stereo is almost 10.6 Mbytes  For images – resolution (number of samples in horizontal and vertical direction) takes role of sampling rate – Precision is measured by number of bits per sample (samples are called pixels) per channel

(2.24) Original – 1600 x 800 Pixels, 24 Bits per Pixel

(2.25) Lower Resolution – 300 x 150 Pixels, 24 Bit

(2.26) Lower Resolution – 150 x 75 Pixels, 24 Bit

(2.27) Lower Resolution – 50 x 25 Pixels, 24 Bit

(2.28) Lower Resolution – 25 x 12 Pixels, 24 Bit

(2.29) Base Image – 300 x 150, 24 Bit

(2.30) Lower Precision – 300 x 200 Pixels, 8 Bit

(2.31) Lower Precision – 300 x 200 Pixels, 4 Bits

(2.32) Lower Precision – 300 x 200 Pixels, 1 Bit

(2.33) Boolean Algebra  Developed in 1854 by English mathematician George Boole – logical algebra in which all quantities are either true or false – fits well with binary representations (1 = true, 0 = false)  Foundation of all computer hardware design  Three fundamental logical operations example of a truth table

(2.34) Boolean Algebra (continued)  It’s important that the possible values for A and B are assigned so they cover all the possible combinations – assign methodically as shown on preceding slide

(2.35) Boolean Algebra (continued)  Two other logical operations (combinations of the fundamental ones) are important – not or (nor) – not and (nand) – any logic function that can be expressed using and, or, not can also be expressed using just one of nand, nor think of as or followed by not, or and followed by not

(2.36) Logical Expressions  Can combine these logical operations just as we combine arithmetic expressions, to produce logical expressions – order of operations is not first, then and, then or – do equal precedence operations left to right – change order with parentheses

(2.37) Implementing Logical Expressions  To convert the logical expression to a circuit that calculates the equivalent logical value, simply provide a circuit for each of the terms of the logical expression

(2.38) Implementing Logical Expressions (continued)  Of course, it’s not really as simple as this – there may be many possible logical expressions that produce the same output of 0s and 1s – the hardware designer must choose the optimal one based on one or more criteria » minimum number of logic functions » fewest different types of logic functions » fewest levels of logic functions between inputs and outputs

(2.39) Remembering the Past  The previous logic circuit is an example of a combinational circuit – the output at any given time depends solely on the current values of the input  Another kind of logic circuit is a sequential circuit – the output at any given time depends on the current values of the input and the current value of the output