NUMBER SYSTEM AND COMPUTER CODES Chapter 2. Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups.

Slides:



Advertisements
Similar presentations
DATA REPRESENTATION CONVERSION.
Advertisements

A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Chapter 1 Digital Systems and Numbers System
CIS 020 Assembly Programming Chapter 02 - Numbering Systems & Data Representation © John Urrutia 2012, All Rights Reserved.5/27/20121.
CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals Floyd Chapter 2 Tenth Edition
SYEN 3330 Digital Systems Jung H. Kim Chapter 1 1 SYEN 3330 Digital Systems Chapter 1.
Overview Digital Systems, Computers, and Beyond
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
Digital Fundamentals Floyd Chapter 2 Tenth Edition
Binary Numbers.
COMPUTER FUNDAMENTALS David Samuel Bhatti
Data Representation in Computers. Data Representation in Computers/Session 3 / 2 of 33 Number systems  The additive approach – Number earlier consisted.
Digital Logic Chapter 2 Number Conversions Digital Systems by Tocci.
Introduction to Digital Logic Design
Number Systems and Codes
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
NUMBER SYSTEMS.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numeral Systems Subjects: Numeral System Positional systems Decimal
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 1 – Digital Systems and Information Logic.
1 Digital Technology and Computer Fundamentals Chapter 1 Data Representation and Numbering Systems.
Chapter 3 Data Representation
Binary Arithmetic & Data representation
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
Number Systems Spring Semester 2013Programming and Data Structure1.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Computer Systems Architecture Copyright © Genetic Computer School 2008 CSA 1- 0 Lesson 1 Number System.
Number systems, Operations, and Codes
Chapter1: Number Systems
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Computer System Basics 1 Number Systems & Text Representation Computer Forensics BACS 371.
1 Data Representation Characters, Integers and Real Numbers Binary Number System Octal Number System Hexadecimal Number System Powered by DeSiaMore.
Number Systems and Digital Codes
Data Representation, Number Systems and Base Conversions
Computer Math CPS120 Introduction to Computer Science Lecture 4.
AEEE2031 Data Representation and Numbering Systems.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Digital Fundamentals Tenth Edition Floyd Chapter 2 © 2008 Pearson Education.
1 CS151 Introduction to Digital Design Chapter 1 Lecture 3.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
ECE/CS 352 Digital System Fundamentals© T. Kaminski & C. Kime 1 ECE/CS 352 Digital Systems Fundamentals Spring 2001 Chapter 1 Tom Kaminski & Charles R.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Logic Design Dr. Oliver Faust.
Overview 1-1 Information Representation
Computer Math CPS120 Introduction to Computer Science Lecture 7.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
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.
Introduction to signals The signals are broadly classified into two categories: 1. Analog Signals. 2. Digital signals.
Some basic concepts underlying computer archi­tecture
EI205 Lecture 2 Dianguang Ma Fall, 2008.
CHAPTER 1 : INTRODUCTION
Number System Submitted by: Submitted to: Devashish Bhardwaj Miss.Hina
Introduction The term digital is derived from the way computers perform operation, by counting digits. Application of digital technology: television, communication.
Chapter 3 Data Representation
Number Systems.
IT 0213: INTRODUCTION TO COMPUTER ARCHITECTURE
SYEN 3330 Digital Systems Chapter 1 SYEN 3330 Digital Systems.
Overview Digital Systems and Computer Systems
Numbering System TODAY AND TOMORROW 11th Edition
Digital Logic Design (ECEg3141) 2. Number systems, operations & codes 1.
2’s Complement form 1’s complement form 2’s complement form
Chapter Four Data Representation in Computers By Bezawit E.
COE 202: Digital Logic Design Number Systems Part 2
Presentation transcript:

NUMBER SYSTEM AND COMPUTER CODES Chapter 2

Prelude Fingers, sticks, and other things for counting were not enough! Counting large numbers Count in groups Evolution of the number system

Number systems A set of values used to represent quantity Non-Positional Number Systems count with their fingers, stones and pebbles difficult to perform arithmetic operations No zero, difficult to calculate large numbers E.g. the Roman number system Positional Number Systems Finite number of symbols to represent any numbers Symbol and it’s position defines a number Decimal, binary, octal, hexadecimal

ASCII- American standard for Information Interchange

Base or radix Number of unique digits

Number Systems - Decimal The decimal system is a base-10 system. There are 10 distinct digits (0 to 9) to represent any quantity. For an n-digit number, the value that each digit represents depends on its weight or position. The weights are based on powers of = 1* * * *10 0 =

Number Systems - Binary The binary system is a base-2 system. There are 2 distinct digits (0 and 1) to represent any quantity. For an n-digit number, the value of a digit in each column depends on its position. The weights are based on powers of = 1* * * *2 0 =8+2+1 =11 10

Number Systems - Octal Octal and hexadecimal systems provide a shorthand way to deal with the long strings of 1’s and 0’s in binary. Octal is base-8 system using the digits 0 to 7. To convert to decimal, you can again use a column weighted system = 7*83 + 5*82 + 1*81 + 2*80 = An octal number can easily be converted to binary by replacing each octal digit with the corresponding group of 3 binary digits =

Number Systems - Hexadecimal Hexadecimal is a base-16 system. It contains the digits 0 to 9 and the letters A to F (16 digit values). The letters A to F represent the unit values 10 to 15. This system is often used in programming as a condensed form for binary numbers (0x00FF, 00FFh) To convert to decimal, use a weighted system with powers of 16. 9

Example- Value of 2001 in Binary, Octal and Hexadecimal 10

Example- Conversion: Binary  Octal  Hexadecimal 11

Converting decimal to binary, octal and hexadecimal To convert from decimal to a different number base such as Octal, Binary or Hexadecimal involves repeated division by that number base Keep dividing until the quotient is zero Use the remainders in reverse order as the digits of the converted number 12 Repeated Divide by 2

Base N to Decimal Conversions Multiply each digit by increasing powers of the base value and add the terms Example: = ??? (decimal) 04/03/10 CPE1002 (c) Monash University13

Binary Addition Similar to decimal operation Leading zeroes are frequently dropped. 4 Possible Binary Addition Combinations: (1) 0(2) (3) 1(4) Sum Carry Ex 1,2,3 For Exam

Binary Subtraction Just like subtraction in any other base Minuend Subtrahend Difference And when a borrow is needed. Note that the borrow gives us 2 in the current bit position. Ex 1,2 For Exam

And a full example And more ripple -

Octal/Hex addition/subtraction 17 Octal Addition Carries Augends Addend Sum Octal Subtraction Borrows Minuend Subtrahend Difference Hexadecimal Addition Carries 5 B A 9 Augend + D Addend 1 2 C 0 1 Sum Hexadecimal Subtraction 9 10 A 10 Borrows A 5 B 9 Minuend D Subtrahend 4 D A C Difference

BCD Binary-coded decimal, or BCD, is a method of using binary digits to represent the decimal digits 0 through 9. A decimal digit is represented by four binary digits … The binary combinations 1010 to 1111 are invalid and are not used.

ASCII Code "ask-key“- common code for microcomputer Standard ASCII character set 128 decimal numbers ranging (0-127) Assigned to letters, numbers, punctuation marks, and the most common special characters. The Extended ASCII Character Set also consists of 128 decimal numbers ( ) representing additional special, mathematical, graphic, and foreign characters. Groups of 32 characters

EBCDIC - Extended Binary Coded Decimal Interchange Code It is an 8 bit character encoding Used on IBM mainframes and AS/400s. It is descended from punched cards The first four bits are called the zone category of the character Last four bits are the called the digit identify the specific character There are a number of different versions of EBCDIC, customized for different countries.

Assignments IOA, IA, GA, Case

Chapter 122 Binary Multiplication Division Multiplicand x Multiplier Product