# Data Representation in Computers

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Chapter 3 Data Representation in Computers After studying this chapter the student will be able to: *Learn about binary, octal, decimal and hexadecimal number systems *Learn conversions between two different number systems *Understand internal storage encoding of characters: ASCII, ISCII and UNICODE Binary Representation of Data In order to work with data, the data must be represented inside the computer. Digital computers represent data by means of an easily identified symbol called a digit. Numbering Systems Each number system has a base also called a Radix. A decimal number system is a system of base 10; binary is a system of base 2; octal is a system of base 8; and hexadecimal is a system of base 16. What are these varying bases? The answer lies in what happens when we count up to the maximum number that the numbering system allows. In base 10, we can count from 0 to 9, that is,10 digits. Number System Base Symbols used Binary 2 0,1 Octal 8 0,1,2,3,4,5,6,7 Decimal 10 0,1,2,3,4,5,6,7,8,9 Hexadecimal 16 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F where A = 10; B = 11; C = 12; D = 13; E = 14; F = 15 37

2 Converting a number from one Base to another: Binary to Decimal Method to convert Binary to Decimal: 1. Start at the rightmost bit. 2. Take that bit and multiply by 2 n where n is the current position beginning at 0 and increasing by 1 each time. This represents a power of two. 3. Sum each terms of product until all bits have been used. Convert the Binary number to its Decimal equivalent. 1 * * * * * * = (43)10 Convert the Binary number 1001 to its Decimal equivalent. 1 * * * * = (9)10 Binary fraction to decimal Convert ( )2 to decimal = (1 x 2 4 )+ (1 x 2 3 )+ (0 x 2 2 )+ (1 x 2 1 )+ (1 x 2 0 )+ (1 x 2-1 )+ (0 x 2-2 )+ (1 x 2-3 ) = = (27.625)10 Decimal to Binary Method to convert a Decimal number into its Binary equivalent: 38

3 1. Divide the decimal number by Take the remainder and record it on the side. 3. Divide the quotient by REPEAT UNTIL the decimal number cannot be divided further. 5. Record the remainders in reverse order and you get the resultant binary number. Convert the Decimal number 125 into its Binary equivalent. 125 / 2 = / 2 = / 2 = / 2 = / 2 = / 2 = / 2 = 0 1 Answer: ( )2 Converting Decimal fraction to Binary Convert (0.75)10 to binary Multiply the given fraction by 2. Keep the integer in the product as it is and multiply the new fraction in the product by 2. Continue the process till the required number of decimal places or till you get zero in the fraction part. Record the integers in the products from top to bottom. Given fraction 0.75 Multiply 0.75 by Multiply 0.50 by Reading the integers from top to bottom 0.75 in decimal number system is 0.11 in binary number system. 39

4 Convert (105.15)10 to binary Let us convert 105 first. (105)10 = ( )2 Let us convert (0.15) 10 Multiply 0.15 by Multiply 0.30 by Multiply 0.60 by Multiply 0.20 by Multiply 0.40 by Multiply 0.80 by Reading the integers from top to bottom (0.15)10 = ( )2 Final result (105.15) 10 = ( )2 Decimal to Octal The method to convert a decimal number into its octal equivalent: 1. Divide the decimal number by Take the remainder and record it on the side. 3. Divide the quotient by REPEAT UNTIL the decimal number cannot be divided further. 5. Record the remainders in reverse order and you get the resultant binary Convert the Decimal number 125 into its Octal equivalent. 125 / 8 = / 8 = 1 7 1/8 =0 1 40

5 Answer: (175)8 Converting Decimal fraction to Octal Convert (0.75)10 to Octal Multiply the given fraction by 8. Keep the integer in the product as it is and multiply the new fraction in the product by 8. Continue the process and read the integers in the products from top to bottom. Given fraction 0.75 Multiply 0.75 by Reading the integers from top to bottom 0.75 in decimal number system is 0.6 in octal number system. Octal to Decimal Method to convert Octal to Decimal: 1. Start at the rightmost bit. 2. Take that bit and multiply by 8 n where n is the current position beginning at 0 and increasing by 1 each time. This represents the power of Sum each of the product terms until all bits have been used. Convert the Octal number 321 to its Decimal equivalent. 3 * * * = (209)10 Octal fraction to decimal Convert (23.25)8 to decimal

6 = (2 x 8 1 )+ (3 x 8 0 )+ (2 x 8-1 )+ (5 x 8-2 ) = = ( )10 Decimal to Hexadecimal Method to convert a Decimal number into its Hexadecimal equivalent: 1. Divide the decimal number by Take the remainder and record it on the side. 3. REPEAT UNTIL the decimal number cannot be divided further. 4. Record the remainders in reverse order and you get the equivalent hexadecimal number. Convert the Decimal number 300 into its hexadecimal equivalent. 300 / 16 = (C) 18 / 16 = / 16 = 0 1 Answer: (12C)16 Converting Decimal fraction to Hexadecimal Convert (0.75)10 to hexadecimal Multiply the given fraction by 16. Keep the integer in the product as it is and multiply the new fraction in the product by 16. Continue the process and read the integers in the products from top to bottom. Given fraction 0.75 Multiply 0.75 by C Reading the integers from top to bottom 0.75 in decimal number system is 0C in Hexadecimal number system. 42

7 Hexadecimal to Decimal Method to convert Hexadecimal to Decimal: 1. Start at the rightmost bit. 2. Take that bit and multiply by 16 n where n is the current position beginning at 0 and increasing by 1 each time. This represents a power of Sum each terms of product until all bits have been used. Convert the Hexadecimal number AB to its Decimal equivalent. =A * B * 16 0 =10 * * 16 0 = = (171)16 Hexadecimal fraction to decimal Convert (1E.8C)16 to decimal E 8 C = (1 x 16 1 )+ (14 x 16 0 )+ (8 x 16-1 )+ (12 x 16-2 ) = = ( )10 Binary to Hexadecimal The hexadecimal number system uses the digits 0 to 9 and A, B, C, D, E, F. Method to convert a Binary number to its Hexadecimal equivalent is: We take a binary number in groups of 4 and use the appropriate hexadecimal digit in it s place. We begin at the rightmost 4 bits. If we are not able to form a group of four, insert 0s to the left until we get all groups of 4 bits each. Write the hexadecimal equivalent of each group. Repeat the steps until all groups have been converted. 43

10 Answer: (172)16 The following table summarizes the number representation in decimal, binary, octal and hexadecimal number system: Decimal Binary Octal Hexadecimal A B C D E F Fig: Number Representation 46

11 Binary Representation of Integers Binary number can be represented only by using 0 s and 1 s, but can not use the sign (-) to denote the negative number or sign (+) to denote the positive number. So it must be either 0 or 1. There are three methods to represent binary number. They are (i) (ii) Sign and magnitude method One s complement method (iii) Two s complement method Sign and magnitude method In this method, first bit is considered as a sign bit. Here positive number starts with 0 and negative number starts with /2 = /2 = 6 0 6/2 = 3 0 3/2 = 1 1 1/2 = 0 1 So the binary number is (11001)2. If we take the size of the word is 1 byte, then the number 25 will be represented as Suppose, if the number is -25, and then it will be represented as One s Complement Method In this method, the positive number is represented as same as the binary number. If the number is negative, then we need to find one s complement of a binary number. The one s complement of a binary number will replace every 0 with 1 and vice- versa. 47

12 (i) Represent 86 in one s complement method (I byte representation) 86/2 = /2 = /2 = /2 =5 0 5/2 =2 1 2/2 =1 0 1/2 =0 1 The binary number is byte representation of number 86 is (ii) Represent -55 in one s complement method (I byte representation) 55/2 = /2 = /2 =6 1 6/2 =3 0 3/2 =1 1 1/2 =0 1 The binary number is byte representation is The given number is negative; hence we need to calculate one s complement One s complement of is (convert 1 into 0 and 0 into 1) Thus, the 1 byte representation of number -55 is

13 Two s Complement method In this method, the positive number is represented as the binary number. If the number is negative, then we need to calculate two s complement of a binary number. The two s complement of a binary number is calculated by adding 1 to its one s complement. (i) Represent 87 in two s complement method (I byte representation) 87/2 = /2 = /2 = /2 =5 0 5/2 =2 1 2/2 =1 0 1/2 =0 1 The binary number is Hence, the 1 byte representation of number 86 is (ii) Represent -54 two s complement method (I byte representation) 54/2 = /2 = /2 =6 1 6/2 =3 0 3/2 =1 1 1/2 =0 1 The binary number is Hence, the 1 byte representation is The given number is negative; hence we need to calculate two s complement. One s complement of is (convert 1 into 0 and 0 into 1) 49

14 Add 1 to one s complement (1+1=2, binary equivalent =11) Thus, 1 byte representation of number -54 is (iii) Represent -77 two s complement method (I byte representation) 77/2 = /2 = /2 =9 1 9/2 =4 1 4/2 =2 0 2/2 =1 0 1/2 =0 1 The binary number is Hence, 1 byte representation is Since the given number is negative, we need to calculate two s complement. One s complement of is Thus, 1 byte representation of number -77 is Representing Characters A computer can handle numeric and non numeric data like letters, punctuation marks and other special characters. Some predefined codes are used to represent numeric and non numeric characters. Some of the standards are discussed below: 50

15 ASCII ASCII stands for American Standard Code for Information Interchange. ASCII-7 can represent 128 characters. Out of 7 bits, 3 are zone bits and 4 are numeric bits. ASCII-8 can represent 256 characters. It is an extended form of ASCII-7. Character ASCII-7 Code ASCII-8 Code Zone Digit Zone Digit A B C D E F G H I J K

16 L M N O P Q R S T U V W X Y Z ISCII: (Indian Standard Code for Information Interchange) A lot of efforts have gone into facilitating the use of Indian languages on computers. In 1991, the Bureau of Indian Standards adopted the ISCII. It is an 8 bit code which allows English and Indian Scripts alphabets to be used simultaneously. Characters coded in ISCII need 8 bits for each character. Unicode Unicode is a new universal coding standard adopted by all new platforms. It is promoted by Unicode Consortium which is a non profit organization. Unicode provides a unique number for every character irrespective of the platform, program and the language. It is a character coding system designed to support the worldwide interchange, processing, and display of the written texts of the diverse languages. 52

17 EXERCISE a) What does ASCII stand for? b) What does the base of a Number system mean? c) What is the base of Decimal, Binary, Octal and Hexadecimal number systems? d) How many digits are there in a Binary number system? e) Which digits are used in Hexadecimal number system? f) What is Unicode? How is it useful? g) Distinguish between ASCII and ISCII. h) Do as directed : Convert the Decimal number 781 to its Binary equivalent. Convert Binary number to its decimal equivalent Convert Octal number into its Binary equivalent Convert the Hexadecimal number 3BC into its Binary equivalent Convert the Binary number to its Hexadecimal equivalent Convert the Decimal number 345 into Octal number. Convert the Decimal number 736 into Hexadecimal number. Convert the Octal number into Hexadecimal number. Convert the Hexadecimal number ABF.C into Octal number. Convert the Octal number 576 to Decimal. Convert the Hexadecimal number A5C1 to Decimal. 53

### Number System. Some important number systems are as follows. Decimal number system Binary number system Octal number system Hexadecimal number system

Number System When we type some letters or words, the computer translates them in numbers as computers can understand only numbers. A computer can understand positional number system where there are only

### Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

### Logic Design. Dr. Yosry A. Azzam

Logic Design Dr. Yosry A. Azzam Binary systems Chapter 1 Agenda Binary Systems : Binary Numbers, Binary Codes, Binary Logic ASCII Code (American Standard Code for Information Interchange) Boolean Algebra

### Chapter 3: Number Systems

Slide 1/40 Learning Objectives In this chapter you will learn about: Non-positional number system Positional number system Decimal number system Binary number system Octal number system Hexadecimal number

### Number Systems and Base Conversions

Number Systems and Base Conversions As you know, the number system that we commonly use is the decimal or base- 10 number system. That system has 10 digits, 0 through 9. While it's very convenient for

### Digital Fundamentals

Digital Fundamentals with PLD Programming Floyd Chapter 2 29 Pearson Education Decimal Numbers The position of each digit in a weighted number system is assigned a weight based on the base or radix of

### MT1 Number Systems. In general, the number a 3 a 2 a 1 a 0 in a base b number system represents the following number:

MT1 Number Systems MT1.1 Introduction A number system is a well defined structured way of representing or expressing numbers as a combination of the elements of a finite set of mathematical symbols (i.e.,

### COMPUTER NUMBER CONVERSIONS Binary to Decimal Conversion

COMPUTER NUMBER CONVERSIONS Binary to Decimal Conversion Any binary number can be converted to its decimal equivalent simply by summing together the weights of the various positions in the binary number

### Number base conversion

Number base conversion The human being use decimal number system while computer uses binary number system. Therefore it is necessary to convert decimal number into its binary equivalent while feeding number

### Binary Numbers. X. Zhang Fordham Univ.

Binary Numbers X. Zhang Fordham Univ. 1 Numeral System! A way for expressing numbers, using symbols in a consistent manner.!! "11" can be interpreted differently:!! in the binary symbol: three!! in the

### Radix Number Systems. Number Systems. Number Systems 4/26/2010. basic idea of a radix number system how do we count:

Number Systems binary, octal, and hexadecimal numbers why used conversions, including to/from decimal negative binary numbers floating point numbers character codes basic idea of a radix number system

### Number Systems. Decimal Number System. Number Systems Week 3

Number Systems When we type some letters or words, the computer translates them in numbers as computers can understand only numbers. A computer can understand positional number system where there are only

### NUMBER SYSTEMS. 1.1 Introduction

NUMBER SYSTEMS 1.1 Introduction There are several number systems which we normally use, such as decimal, binary, octal, hexadecimal, etc. Amongst them we are most familiar with the decimal number system.

### Encoding Systems: Combining Bits to form Bytes

Encoding Systems: Combining Bits to form Bytes Alphanumeric characters are represented in computer storage by combining strings of bits to form unique bit configuration for each character, also called

Review of Number Systems The study of number systems is important from the viewpoint of understanding how data are represented before they can be processed by any digital system including a computer. Different

### 2.1 Binary Numbers. 2.3 Number System Conversion. From Binary to Decimal. From Decimal to Binary. Section 2 Binary Number System Page 1 of 8

Section Binary Number System Page 1 of 8.1 Binary Numbers The number system we use is a positional number system meaning that the position of each digit has an associated weight. The value of a given number

### Useful Number Systems

Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2

### Number Representation

Number Representation Number System :: The Basics We are accustomed to using the so-called decimal number system Ten digits ::,,,3,4,5,6,7,8,9 Every digit position has a weight which is a power of Base

### 2 Number Systems. Source: Foundations of Computer Science Cengage Learning. Objectives After studying this chapter, the student should be able to:

2 Number Systems 2.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Understand the concept of number systems. Distinguish

### Number Systems Richard E. Haskell

NUMBER SYSTEMS D Number Systems Richard E. Haskell Data inside a computer are represented by binary digits or bits. The logical values of these binary digits are denoted by and, while the corresponding

### Switching Circuits & Logic Design

Switching Circuits & Logic Design Jie-Hong Roland Jiang 江介宏 Department of Electrical Engineering National Taiwan University Fall 2013 1 1 Number Systems and Conversion Babylonian number system (3100 B.C.)

### The representation of data within the computer

The representation of data within the computer Digital and Analog System of Coding Digital codes. Codes that represent data or physical quantities in discrete values (numbers) Analog codes. Codes that

### Lecture.5. Number System:

Number System: Lecturer: Dr. Laith Abdullah Mohammed Lecture.5. The number system that we use in day-to-day life is called Decimal Number System. It makes use of 10 fundamental digits i.e. 0, 1, 2, 3,

### By the end of the lecture, you should be able to:

Extra Lecture: Number Systems Objectives - To understand: Base of number systems: decimal, binary, octal and hexadecimal Textual information stored as ASCII Binary addition/subtraction, multiplication

### Chapter 4: Computer Codes

Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data

### 1.3 Data Representation

8628-28 r4 vs.fm Page 9 Thursday, January 2, 2 2:4 PM.3 Data Representation 9 appears at Level 3, uses short mnemonics such as ADD, SUB, and MOV, which are easily translated to the ISA level. Assembly

### Here 4 is the least significant digit (LSD) and 2 is the most significant digit (MSD).

Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

### Binary Representation. Number Systems. Positional Notation

Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems

### Understanding Binary Numbers. Different Number Systems. Conversion: Bin Hex. Conversion MAP. Binary (0, 1) Hexadecimal 0 9, A(10), B(11),, F(15) :

Understanding Binary Numbers Computers operate on binary values (0 and 1) Easy to represent binary values electrically Voltages and currents. Can be implemented using circuits Create the building blocks

### Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems

### CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

### CHAPTER 1 BINARY SYSTEM

STUDENT COPY DIGITAL & MICROPROCESSORS 3 CHAPTER 1 BINARY SYSTEM Base Conversion: A number a n, a n 1 a 2, a 1 a 0 a 1 a 2 a 3 expressed in a base r system has coefficient multiplied by powers of r. n

### Section Summary. Integer Representations. Base Conversion Algorithm Algorithms for Integer Operations

Section 4.2 Section Summary Integer Representations Base b Expansions Binary Expansions Octal Expansions Hexadecimal Expansions Base Conversion Algorithm Algorithms for Integer Operations Representations

### Number Systems and Data Representation CS221

Number Systems and Data Representation CS221 Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk, or as a state in a transistor, core,

### Chapter No.5 DATA REPRESENTATION

Chapter No.5 DATA REPRESENTATION Q.5.01 Complete the following statements. i) Data is a collection of ii) Data becomes information when properly. iii) Octal equivalent of binary number 1100010 is iv) 2

### Unit 2: Number Systems, Codes and Logic Functions

Unit 2: Number Systems, Codes and Logic Functions Introduction A digital computer manipulates discrete elements of data and that these elements are represented in the binary forms. Operands used for calculations

### Chapter I: Digital System and Binary Numbers

Chapter I: Digital System and Binary Numbers 1-1Digital Systems Digital systems are used in: - Communication - Business transaction - Traffic Control - Medical treatment - Internet The signals in digital

### Lecture 11: Number Systems

Lecture 11: Number Systems Numeric Data Fixed point Integers (12, 345, 20567 etc) Real fractions (23.45, 23., 0.145 etc.) Floating point such as 23. 45 e 12 Basically an exponent representation Any number

### Binary Numbers. Binary Numbers. Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria

Binary Numbers Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria Wolfgang.Schreiner@risc.uni-linz.ac.at http://www.risc.uni-linz.ac.at/people/schreine

### Number Representation

Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

### 1. True or False? A natural number is the number 0 or any number obtained by adding 1 to a natural number.

CS Illuminated, 5 th ed. Chapter 2 Review Quiz 1. True or False? A natural number is the number 0 or any number obtained by adding 1 to a natural number. 2. True or False? The category of numbers called

### THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM Eng. Huda M.

THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM 2012 Eng. Huda M. Dawoud September, 2015 1.1 List the octal and hexadecimal numbers

### Number Systems. In primary school, we would have learned the place values like this: Digit Contributed value = 8000

Number Systems The Decimal (Denary) System A good understanding of other number systems depends on a good understanding of the decimal system that you have used for counting and arithmetic since you started

### 2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

2 Number Systems 2.1 Foundations of Computer Science Cengage Learning 2.2 Objectives After studying this chapter, the student should be able to: Understand the concept of number systems. Distinguish between

### COMP2121: Microprocessors and Interfacing

Interfacing Lecture 3: Number Systems (I) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2005 Overview Positional notation Decimal, hexadecimal and binary One complement Two s complement

### CSC 1103: Digital Logic. Lecture Six: Data Representation

CSC 1103: Digital Logic Lecture Six: Data Representation Martin Ngobye mngobye@must.ac.ug Mbarara University of Science and Technology MAN (MUST) CSC 1103 1 / 32 Outline 1 Digital Computers 2 Number Systems

### EE 3170 Microcontroller Applications

EE 37 Microcontroller Applications Lecture 3 : Digital Computer Fundamentals - Number Representation (.) Based on slides for ECE37 by Profs. Sloan, Davis, Kieckhafer, Tan, and Cischke Number Representation

### الدكتور المھندس عادل مانع داخل

الدكتور المھندس عادل مانع داخل / میسان جامعة / كلیة الھندسة قسم الھندسة الكھرباي یة Chapter 1: Digital Systems Discrete Data Examples: 26 letters of the alphabet (A, B etc) 10 decimal digits (0, 1, 2 etc)

### Data Representation. Data Representation, Storage, and Retrieval. Data Representation. Data Representation. Data Representation. Data Representation

, Storage, and Retrieval ULM/HHIM Summer Program Project 3, Day 3, Part 3 Digital computers convert the data they process into a digital value. Text Audio Images/Graphics Video Digitizing 00000000... 6/8/20

### After studying this lesson, you will gain a clear understanding on, Binary, Octal, Decimal and hexadecimal number systems

After studying this lesson, you will gain a clear understanding on, various number systems Binary, Octal, Decimal and hexadecimal number systems conversions among number systems units used in measuring

### CHAPTER 2 Data Representation in Computer Systems

CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 47 2.2 Positional Numbering Systems 48 2.3 Converting Between Bases 48 2.3.1 Converting Unsigned Whole Numbers 49 2.3.2 Converting Fractions

### Binary Numbers. Binary Numbers. Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria

Binary Numbers Wolfgang Schreiner Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria Wolfgang.Schreiner@risc.uni-linz.ac.at http://www.risc.uni-linz.ac.at/people/schreine

### 1 Basic Computing Concepts (4) Data Representations

1 Basic Computing Concepts (4) Data Representations The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The

### The string of digits 101101 in the binary number system represents the quantity

Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

### EE 261 Introduction to Logic Circuits. Module #2 Number Systems

EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

### CSCC85 Spring 2006: Tutorial 0 Notes

CSCC85 Spring 2006: Tutorial 0 Notes Yani Ioannou January 11 th, 2006 There are 10 types of people in the world, those who understand binary, and those who don t. Contents 1 Number Representations 1 1.1

### Number Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi)

Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi) INTRODUCTION System- A number system defines a set of values to represent quantity. We talk about the number of people

### The largest has a 0 in the sign position and 0's in all other positions:

10.2 Sign Magnitude Representation Sign Magnitude is straight-forward method for representing both positive and negative integers. It uses the most significant digit of the digit string to indicate the

### Digital System Design Prof. D. Roychoudhury Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D. Roychoudhury Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 03 Digital Logic - I Today, we will start discussing on Digital

### Base Conversion written by Cathy Saxton

Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,

### Chapter 1: Digital Systems and Binary Numbers

Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching

### Arithmetic of Number Systems

2 Arithmetic of Number Systems INTRODUCTION Arithmetic operations in number systems are usually done in binary because designing of logic networks is much easier than decimal. In this chapter we will discuss

### Section 1.4 Place Value Systems of Numeration in Other Bases

Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason

### Decimal-to-Binary Conversion. Computer & Microprocessor Architecture HCA103. Repeated Division-by-2 Method. Repeated Multiplication-by-2 Method

Decimal-to-Binary Conversion Computer & Microprocessor Architecture HCA103 Computer Arithmetic Algorithm 1 Step 1: Break the number in two parts: Whole number and fraction part. Step 2: Repeated Division-by-2

### Chapter 4. Binary Data Representation and Binary Arithmetic

Christian Jacob Chapter 4 Binary Data Representation and Binary Arithmetic 4.1 Binary Data Representation 4.2 Important Number Systems for Computers 4.2.1 Number System Basics 4.2.2 Useful Number Systems

### Activity 1: Bits and Bytes

ICS3U (Java): Introduction to Computer Science, Grade 11, University Preparation Activity 1: Bits and Bytes The Binary Number System Computers use electrical circuits that include many transistors and

### Data Representation. Representing Data

Data Representation COMP 1002/1402 Representing Data A computer s basic unit of information is: a bit (Binary digit) An addressable memory cell is a byte (8 bits) Capable of storing one character 10101010

### 2011, The McGraw-Hill Companies, Inc. Chapter 3

Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

### LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3

### Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x

### 1 Number System (Lecture 1 and 2 supplement)

1 Number System (Lecture 1 and 2 supplement) By Dr. Taek Kwon Many different number systems perhaps from the prehistoric era have been developed and evolved. Among them, binary number system is one of

### CHAPTER 3 Number System and Codes

CHAPTER 3 Number System and Codes 3.1 Introduction On hearing the word number, we immediately think of familiar decimal number system with its 10 digits; 0,1, 2,3,4,5,6, 7, 8 and 9. these numbers are called

### Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

### D r = d p-1 d p-2.. d 1 d 0.d -1 d -2. D -n. EECC341 - Shaaban

Positional Number Systems A number system consists of an order set of symbols (digits) with relations defined for +,-,*, / The radix (or base) of the number system is the total number of digits allowed

### A B C

Data Representation Module 2 CS 272 Sam Houston State University Dr. Tim McGuire Copyright 2001 by Timothy J. McGuire, Ph.D. 1 Positional Number Systems Decimal (base 10) is an example e.g., 435 means

### Number Systems and. Data Representation

Number Systems and Data Representation 1 Lecture Outline Number Systems Binary, Octal, Hexadecimal Representation of characters using codes Representation of Numbers Integer, Floating Point, Binary Coded

### CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Data Representation Binary Codes Why 6-3-1-1 and Excess-3? Data Representation (1/2) Each numbering

### Chapter 2 Numeric Representation.

Chapter 2 Numeric Representation. Most of the things we encounter in the world around us are analog; they don t just take on one of two values. How then can they be represented digitally? The key is that

### Chapter 2: Number Systems

Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many

### Number Systems & Encoding

Number Systems & Encoding Lecturer: Sri Parameswaran Author: Hui Annie Guo Modified: Sri Parameswaran Week2 1 Lecture overview Basics of computing with digital systems Binary numbers Floating point numbers

### Review of Number Systems Binary, Octal, and Hexadecimal Numbers and Two's Complement

Review of Number Systems Binary, Octal, and Hexadecimal Numbers and Two's Complement Topic 1: Binary, Octal, and Hexadecimal Numbers The number system we generally use in our everyday lives is a decimal

### Binary Representation

Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must tbe able to handle more than just values for real world problems

### Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n

### EEE130 Digital Electronics I Lecture #2

EEE130 Digital Electronics I Lecture #2 -Number Systems, Operations and Codes- By Dr. Shahrel A. Suandi Topics to be discussed 2-1 Decimal Numbers 2-2 Binary Numbers 2-3 Decimal-to-Binary Conversion 2-4

### Integer Numbers. The Number Bases of Integers Textbook Chapter 3

Integer Numbers The Number Bases of Integers Textbook Chapter 3 Number Systems Unary, or marks: /////// = 7 /////// + ////// = ///////////// Grouping lead to Roman Numerals: VII + V = VVII = XII Better:

### Lecture 1 Introduction, Numbers, and Number System Page 1 of 8

Lecture Introduction, Numbers and Number System Contents.. Number Systems (Appendix B)... 2. Example. Converting to Base 0... 2.2. Number Representation... 2.3. Number Conversion... 3. To convert a number

### NUMBERSYSTEMS hundreds 8 tens 5 ones Thus,the numeral 485 represents the number four-hundred eighty-five and can be written in expanded formas

NUMBERSYSTEMS We noted in several places that a binary scheme having only the two binary digits 0 and 1 is used to represent information in a computer. In PART OF THE PIC- TURE: Data Representation in

### UNIT 2: NUMBER SYSTEM AND CODES.

UNIT 2: NUMBER SYSTEM AND CODES. Structure 2.1 Introduction 2.2 Objectives 2.3 Binary Numbers 2.3.1 Binary-to-Decimal conversion 2.3.2 Decimal-to-Binary Conversion 2.4 Octal Numbers 2.4.1 Octal-to-Binary

### 2. Number Systems - Positional Number Systems (1) - 2. Number Systems - Binary Numbers - 2. Number Systems - Positional Number Systems (2) -

Sistemas Digitais I LESI - 2º ano Lesson 2 - Number Systems Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática - Positional Number Systems (1) - We use daily a positional number system.

### Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger

### NUMBER SYSTEMS CHAPTER 19-1

NUMBER SYSTEMS 19.1 The Decimal System 19. The Binary System 19.3 Converting between Binary and Decimal Integers Fractions 19.4 Hexadecimal Notation 19.5 Key Terms and Problems CHAPTER 19-1 19- CHAPTER

### Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we

### Chapter II Binary Data Representation

Chapter II Binary Data Representation The atomic unit of data in computer systems is the bit, which is actually an acronym that stands for BInary digit. It can hold only 2 values or states: 0 or 1, true

### Integer and Real Numbers Representation in Microprocessor Techniques

Brno University of Technology Integer and Real Numbers Representation in Microprocessor Techniques Microprocessor Techniques and Embedded Systems Lecture 1 Dr. Tomas Fryza 30-Sep-2011 Contents Numerical

### NUMBERING SYSTEMS C HAPTER 1.0 INTRODUCTION 1.1 A REVIEW OF THE DECIMAL SYSTEM 1.2 BINARY NUMBERING SYSTEM

12 Digital Principles Switching Theory C HAPTER 1 NUMBERING SYSTEMS 1.0 INTRODUCTION Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk,

### Number Systems I. CIS008-2 Logic and Foundations of Mathematics. David Goodwin. 11:00, Tuesday 18 th October

Number Systems I CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 11:00, Tuesday 18 th October 2011 Outline 1 Number systems Numbers Natural numbers Integers Rational

### 3. Convert a number from one number system to another

3. Convert a number from one number system to another Conversion between number bases: Hexa (16) Decimal (10) Binary (2) Octal (8) More Interest Way we need conversion? We need decimal system for real

### Lab 1: Information Representation I -- Number Systems

Unit 1: Computer Systems, pages 1 of 7 - Department of Computer and Mathematical Sciences CS 1408 Intro to Computer Science with Visual Basic 1 Lab 1: Information Representation I -- Number Systems Objectives: