Binary Codes. Dr. Mudathir A. Fagiri
|
|
- Anthony Blankenship
- 5 years ago
- Views:
Transcription
1 Binary Codes Dr. Mudathir A. Fagiri
2 Binary System The following are some of the technical terms used in binary system: Bit: It is the smallest unit of information used in a computer system. It can either have the value 0 or 1. Derived from the words Binary ditit. Nibble: It is a combination of 4 bits. Byte: It is a combination of 8 bits. Word: It is a combination of 16 bits. Double word: It is a combination of 32 bits. Kilobyte (KB): It is used to represent the 1024 bytes of information. Megabyte (MB): It is used to represent the 1024 KBs of information. Gigabyte (GB): It is used to represent the 1024 MBs of information. Octal System The weight associated with each digit in the given octal number can be determined by raising 8 to a power equivalent to the position of the digit in the number.
3 4-Bit Binary Coded Decimal (BCD) Systems The BCD system is employed by computer systems to encode the decimal number into its equivalent binary number. This is generally accomplished by encoding each digit of the decimal number into its equivalent binary sequence. The main advantage of BCD system is that it is a fast and efficient system to convert the decimal numbers into binary numbers as compared to the pure binary system.
4 4-Bit Binary Coded Decimal (BCD) Systems The 4-bit BCD system is usually employed by the computer systems to represent and process numerical data only. In the 4-bit BCD system, each digit of the decimal number is encoded to its corresponding 4-bit binary sequence. The two most popular 4-bit BCD systems are: Weighted 4-bit BCD code Excess-3 (XS-3) BCD code
5 Weighted 4-Bit BCD Code The weighted 4-bit BCD code is more commonly known as 8421 weighted code. It is called weighted code because it encodes the decimal system into binary system by using the concept of positional weighting into consideration. In this code, each decimal digit is encoded into its 4-bit binary number in which the bits from left to right have the weights 8, 4, 2, and 1, respectively.
6 Weighted 4-Bit BCD Code Decimal digits Weighted 4-bit BCD code Apart from 8421, some other weighted BCD codes are 4221, 2421 and 5211.
7 Weighted 4-Bit BCD Code Example: Represent the decimal number 5327 in 8421 BCD code. The corresponding 4-bit 8421 BCD representation of decimal digit 5 is 0101 The corresponding 4-bit 8421 BCD representation of decimal digit 3 is 0011 The corresponding 4-bit 8421 BCD representation of decimal digit 2 is 0010 The corresponding 4-bit 8421 BCD representation of decimal digit 7 is 0111 Therefore, the 8421 BCD representation of decimal number 5327 is
8 Excess-3 BCD Code The Excess-3 (XS-3) BCD code does not use the principle of positional weights into consideration while converting the decimal numbers to 4-bit BCD system. Therefore, we can say that this code is a non-weighted BCD code. The function of XS-3 code is to transform the decimal numbers into their corresponding 4-bit BCD code. In this code, the decimal number is transformed to the 4-bit BCD code by first adding 3 to all the digits of the number and then converting the excess digits, so obtained, into their corresponding 8421 BCD code. Therefore, we can say that the XS-3 code is strongly related with 8421 BCD code in its functioning.
9 Excess-3 BCD Code Decimal digits Excess-3 BCD code
10 Excess-3 BCD Code Example : Convert the decimal number 85 to XS-3 BCD code. Add 3 to each digit of the given decimal number as: 8+3=11 5+3=8 The corresponding 4-bit 8421 BCD representation of the decimal digit 11 is The corresponding 4-bit 8421 BCD representation of the decimal digit 8 is Therefore, the XS-3 BCD representation of the decimal number 85 is
11 Excess-3 BCD Code Apart from XS-3 code, the other non-weighted BCD code is 4-bit Gray code. 4-bit BCD systems are inadequate for representing and handling non-numeric data. For this purpose, 6-bit BCD and 8-BCD systems have been developed.
12 8-Bit BCD Systems The 6-bit BCD systems can handle numeric as well as non-numeric data but with few special characters. The 8-bit BCD systems were developed to overcome the limitations of 6-bit BCD systems, which can handle numeric as well as nonnumeric data with almost all the special characters such as +, -, *, $, etc. Therefore, the various codes under the category of 8-bit BCD systems are also known as alphanumeric codes.
13 8-Bit BCD Systems The three most popular 8-bit BCD codes are: Extended Binary Coded Decimal Interchange Code (EBCDIC) American Standard Code for Information Interchange (ASCII) Gray Code
14 EBCDIC Code The EBCDIC code is an 8-bit alphanumeric code that was developed by IBM to represent alphabets, decimal digits and special characters, including control characters. The EBCDIC codes are generally the decimal and the hexadecimal representation of different characters. This code is rarely used by non IBM-compatible computer systems.
15 ASCII Code The ASCII code is pronounced as ASKEE and is used for the same purpose for which the EBCDIC code is used. However, this code is more popular than EBCDIC code as unlike the EBCDIC code this code can be implemented by most of the non-ibm computer systems. Initially, this code was developed as a 7-bit BCD code to handle 128 characters but later it was modified to an 8-bit code.
16 Gray Code Gray code is another important code that is also used to convert the decimal number into 8-bit binary sequence. However, this conversion is carried in a manner that the contiguous digits of the decimal number differ from each other by one bit only.
17 Gray Code Decimal Number 8-Bit Gray Code
18 Gray Code We can convert the Gray coded number to its binary equivalent by remembering the following two major rules: The Most Significant Bit (MSB) of the Gray coded number and the equivalent binary number is always the same. The next-to-most significant bit of the binary number can be determined by adding the MSB of the binary number to the next-to-most significant bit of the gray coded number.
19 Gray Code Example: Convert the Gray coded number to its binary equivalent. The following table lists the steps showing the conversion of the Gray coded number into its binary equivalent: Hence, the binary equivalent of Gray coded number is Gray Coded Digit Binary Addition Operation Binary Digit
20 Gray Code We can also convert a number represented in the binary form to Gray code representation. For carrying out this conversion, we need to remember the following two rules: The Most Significant Bit (MSB) of the binary number and the gray coded number is always the same. The next MSD of the gray coded number can be obtained by adding the subsequent pair of bits of the binary number starting from the left.
21 Gray Code Example: Convert the binary number to its equivalent Gray coded number. Binary Digit Binary Addition Operation Gray Coded Digit Hence, the Gray coded equivalent of the binary number is
22 Signed/Unsigned Numbers The unsigned binary number is the number with a magnitude of either zero or greater than zero, and are usually represented using the unsigned-magnitude representation, which only represents the magnitude of the numbers. This type of representation does not take the sign of the binary numbers into consideration while representing these numbers.
23 Signed/Unsigned Numbers The signed binary numbers are the numbers that are always associated with a sign. This sign helps in identifying whether the given binary number is a positive quantity or a negative quantity. Signed-magnitude representation is a method used in the computer system for representing the signed binary numbers. In this method, an extra bit called sign bit is associated with the magnitude of the given number. This sign bit is used to indicate whether the given binary number is positive or negative. The value of the sign bit is 0 for the positive numbers and 1 for the negative numbers.
24 Signed/Unsigned Numbers Sign bit Sign bit
25 Signed/Unsigned Numbers Advantages of the signed-magnitude representation: It is very easy to represent and understand positive as well as negative numbers using this representation. The binary multiplication and the binary division of the signed binary numbers can be easily performed. Represent equal number of positive and negative quantities that makes it a very symmetrical method of representation.
26 Signed/Unsigned Numbers Disadvantages of the signed-magnitude representation: It is not an easy task to perform the binary addition and the binary subtraction using this representation. It provides two different representations of zero, one for plus zero and another for negative zero but actually they are the same values. This could lead to some confusion while performing various arithmetic operations.
27 Complements of Binary Numbers The complement system can also be used to represent the signed binary numbers apart from the signedmagnitude representation method. In the complement system, the positive integers are represented in a similar manner as they are represented in the signed-magnitude representation. The following are the two most popular complement methods used in the computer system: One s complement Two s complement
28 One s Complement One s complement method can be used to represent negative binary numbers. A negative number can be represented using one s complement method by first computing the binary equivalent of the number and then changing all the zeros with ones and all the ones with zeros. For example, the binary equivalent of the decimal number 15 is Therefore, -15 can be represented using one s complement method as
29 One s Complement The one s complement method also uses the left most bit as the sign bit to indicate the sign of the number. Sign bit
30 One s Complement Integers One s complement representation The one s complement method of representing signed numbers also has two different representations for the number, zero.
31 One s Complement Example: Represent -25 in the one s complement system in byte size. The equivalent binary representation of 25 is in byte size is Now, change all the zeros to ones and all the ones to zeros in order to obtain the ones complement representation: Therefore, the one s complement representation of -25 is
32 Two s Complement Two s complement is the most widely used method for representing negative numbers in the computer system. The two s complement of the given integer can be obtained by adding 1 to the one s complement of that number. For example, the two s complement representation of -15 can be obtained by adding 1 to , which is the one s complement representation of -15. Therefore, the two s complement representation of -15 is
33 Two s Complement The two s complement method also uses the left most bit as the sign bit to indicate the sign of the number. Sign bit
34 Two s Complement Integers Two s complement representation
35 Two s Complement Example : Represent -33 in the two s complement system in byte size. The equivalent binary representation of 33 in a byte is Now, change all the zeros to ones and all the ones to zeros in order to obtain the one s complement representation: Add 1 to the Therefore, the two s complement representation of -33 is
36 Binary Subtraction Using Complements The complement methods can be used to perform the binary subtraction of the signed integers: Smaller number from larger one Larger number from smaller one
37 Smaller Number from Larger One Using one s complement: (1) Obtain the one s complement of the smaller number; (2) Perform the binary addition on the one s complement and the larger number; (3) If a carry is generated, add it to the calculated result for obtaining the final result;
38 Smaller Number from Larger One Example : Subtract 3 from 8 using the one s complement method. The equivalent binary representation of the decimal number 8 is The equivalent binary representation of the decimal number 3 is The one s complement representation of the smaller number 3 is Now, perform the binary addition of the one s complement and the larger number as: Add the generated carry to the calculated result as: Therefore, the result of the binary subtraction performed on the given numbers using one s complement method is 0101.
39 Smaller Number from Larger One Using two s complement: (1) Obtain the two s complement of the smaller number; (2) Perform the binary addition on the two s complement and the larger number; (3) Discard the carry to obtain the final answer;
40 Smaller Number from Larger One Example : Subtract 13 from 15 using the two s complement method. The equivalent binary representation of the decimal number 15 is The equivalent binary representation of the decimal number 13 is Now, perform the binary addition of the two s complement and the larger number as: Discard the carry to obtain the final answer, which is The two s complement representation of the smaller number 13 is 0011.
41 Larger Number from Smaller One Using one s complement: (1) Obtain the one s complement of the larger number; (2) Perform the binary addition on the one s complement and the smaller number to obtain the final answer;
42 Larger Number from Smaller One Example : Subtract 8 from 3 using the one s complement method. - The equivalent binary representation of the decimal number 8 is The equivalent binary representation of the decimal number 3 is Now, perform the binary addition of the one s complement and the smaller number as: Therefore, the result of the binary subtraction performed on the given numbers using one s complement method is The one s complement representation of the larger number 8 is 0111.
43 Larger Number from Smaller One Using two s complement: (1) Obtain the two s complement of the larger number; (2) Perform the binary addition on the two s complement and the smaller number to obtain the final answer;
44 Larger Number from Smaller One Example : Subtract 6 from 4 using two s complement method. - The equivalent binary representation of the decimal number 6 is The equivalent binary representation of the decimal number 4 is The two s complement representation of the larger number 6 is Now, perform the binary addition on the two s complement and the smaller number as: Therefore, the result of the binary subtraction performed on the given numbers using two s complement method is 1110.
BINARY SYSTEM. Binary system is used in digital systems because it is:
CHAPTER 2 CHAPTER CONTENTS 2.1 Binary System 2.2 Binary Arithmetic Operation 2.3 Signed & Unsigned Numbers 2.4 Arithmetic Operations of Signed Numbers 2.5 Hexadecimal Number System 2.6 Octal Number System
More informationElectronic Data and Instructions
Lecture 2 - The information Layer Binary Values and Number Systems, Data Representation. Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert
More informationIT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1
IT 1204 Section 2.0 Data Representation and Arithmetic 2009, University of Colombo School of Computing 1 What is Analog and Digital The interpretation of an analog signal would correspond to a signal whose
More informationBinary Systems and Codes
1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010
More informationMACHINE LEVEL REPRESENTATION OF DATA
MACHINE LEVEL REPRESENTATION OF DATA CHAPTER 2 1 Objectives Understand how integers and fractional numbers are represented in binary Explore the relationship between decimal number system and number systems
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Decimal Numbers The position of each digit in a weighted
More informationCS & IT Conversions. Magnitude 10,000 1,
CS & IT Conversions There are several number systems that you will use when working with computers. These include decimal, binary, octal, and hexadecimal. Knowing how to convert between these number systems
More informationReview of Number Systems
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 digital computer.
More informationLogic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom.
Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm Nathan Pihlstrom www.uccs.edu/~npihlstr My Background B.S.E.E. from Colorado State University M.S.E.E. from Colorado State University M.B.A. from UCCS Ford
More informationSE311: Design of Digital Systems
SE311: Design of Digital Systems Lecture 3: Complements and Binary arithmetic Dr. Samir Al-Amer (Term 041) SE311_Lec3 (c) 2004 AL-AMER ١ Outlines Complements Signed Numbers Representations Arithmetic Binary
More informationChapter 3 DATA REPRESENTATION
Page1 Chapter 3 DATA REPRESENTATION Digital Number Systems In digital systems like computers, the quantities are represented by symbols called digits. Many number systems are in use in digital technology
More informationThus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.
Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations
More informationLecture (02) Operations on numbering systems
Lecture (02) Operations on numbering systems By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2018, CSE202 Logic Design I Complements of a number Complements are used in digital computers to simplify
More informationCHW 261: Logic Design
CHW 261: Logic Design Instructors: Prof. Hala Zayed Dr. Ahmed Shalaby http://www.bu.edu.eg/staff/halazayed14 http://bu.edu.eg/staff/ahmedshalaby14# Slide 1 Slide 2 Slide 3 Digital Fundamentals CHAPTER
More informationComputer Organization
Computer Organization Register Transfer Logic Number System Department of Computer Science Missouri University of Science & Technology hurson@mst.edu 1 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5,
More informationNumber Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010
Contents Number systems and conversion Binary arithmetic Representation of negative numbers Addition of two s complement numbers Addition of one s complement numbers Binary s Readings Unit.~. UNIT NUMBER
More informationChapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.
Chapter 3: Number Systems and Codes Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc., 5 th edition Decimal System The radix or base of a number system determines
More informationNumber Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation
Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur 1 Number Representation 2 1 Topics to be Discussed How are numeric data items actually
More informationNumber Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan
Number Systems Dr. Tarek A. Tutunji Philadelphia University, Jordan Number Systems Programmable controllers use binary numbers in one form or another to represent various codes and quantities. Every number
More informationChapter 1. Digital Systems and Binary Numbers
Chapter 1. Digital Systems and Binary Numbers Tong In Oh 1 1.1 Digital Systems Digital age Characteristic of digital system Generality and flexibility Represent and manipulate discrete elements of information
More informationDigital Arithmetic. Digital Arithmetic: Operations and Circuits Dr. Farahmand
Digital Arithmetic Digital Arithmetic: Operations and Circuits Dr. Farahmand Binary Arithmetic Digital circuits are frequently used for arithmetic operations Fundamental arithmetic operations on binary
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 2 2009 Pearson Education, Upper 2008 Pearson Saddle River, Education NJ 07458. All Rights Reserved Quiz 2 Agenda Lecture: Chapter 2 (2-7 through 2-11):
More informationUNIT 7A Data Representation: Numbers and Text. Digital Data
UNIT 7A Data Representation: Numbers and Text 1 Digital Data 10010101011110101010110101001110 What does this binary sequence represent? It could be: an integer a floating point number text encoded with
More informationChapter 4: Computer Codes. In this chapter you will learn about:
Ref. Page 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 Ref. Page
More information9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation
Data Representation II CMSC 313 Sections 01, 02 The conversions we have so far presented have involved only unsigned numbers. To represent signed integers, computer systems allocate the high-order bit
More informationNumber System. Introduction. Decimal Numbers
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
More informationDigital 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
More informationBasic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal
Basic Definition REPRESENTING INTEGER DATA Englander Ch. 4 An integer is a number which has no fractional part. Examples: -2022-213 0 1 514 323434565232 Unsigned and -Coded Decimal BCD: -Coded Decimal
More informationData Representation and Binary Arithmetic. Lecture 2
Data Representation and Binary Arithmetic Lecture 2 Computer Data Data is stored as binary; 0 s and 1 s Because two-state ( 0 & 1 ) logic elements can be manufactured easily Bit: binary digit (smallest
More informationLecture 2: Number Systems
Lecture 2: Number Systems Syed M. Mahmud, Ph.D ECE Department Wayne State University Original Source: Prof. Russell Tessier of University of Massachusetts Aby George of Wayne State University Contents
More informationMs Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction
Ms Sandhya Rani Dash 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
More informationDigital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes
Digital Fundamentals CHAPTER 2 Number Systems, Operations, and Codes Decimal Numbers The decimal number system has ten digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 The decimal numbering system has a base of
More informationWorld Inside a Computer is Binary
C Programming 1 Representation of int data World Inside a Computer is Binary C Programming 2 Decimal Number System Basic symbols: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Radix-10 positional number system. The radix
More informationdata within a computer system are stored in one of 2 physical states (hence the use of binary digits)
Binary Digits (bits) data within a computer system are stored in one of 2 physical states (hence the use of binary digits) 0V and 5V charge / NO charge on a transistor gate ferrite core magnetised clockwise
More informationNumber Systems Base r
King Fahd University of Petroleum & Minerals Computer Engineering Dept COE 2 Fundamentals of Computer Engineering Term 22 Dr. Ashraf S. Hasan Mahmoud Rm 22-44 Ext. 724 Email: ashraf@ccse.kfupm.edu.sa 3/7/23
More informationIntroduction to Numbering Systems
NUMBER SYSTEM Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems that we will work with are Binary Base 2 Octal Base 8 Hexadecimal
More informationNumbering systems. Dr Abu Arqoub
Numbering systems The decimal numbering system is widely used, because the people Accustomed (معتاد) to use the hand fingers in their counting. But with the development of the computer science another
More informationChapter 2. Data Representation in Computer Systems
Chapter 2 Data Representation in Computer Systems Chapter 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers. Master the skill of converting
More informationThe type of all data used in a C (or C++) program must be specified
The type of all data used in a C (or C++) program must be specified A data type is a description of the data being represented That is, a set of possible values and a set of operations on those values
More informationDIGITAL SYSTEM DESIGN
DIGITAL SYSTEM DESIGN UNIT I: Introduction to Number Systems and Boolean Algebra Digital and Analog Basic Concepts, Some history of Digital Systems-Introduction to number systems, Binary numbers, Number
More informationModule 1: Information Representation I -- Number Systems
Unit 1: Computer Systems, pages 1 of 7 - Department of Computer and Mathematical Sciences CS 1305 Intro to Computer Technology 1 Module 1: Information Representation I -- Number Systems Objectives: Learn
More informationMoodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System
Moodle 1 WILLINGDON COLLEGE SANGLI ELECTRONICS (B. Sc.-I) Introduction to Number System E L E C T R O N I C S Introduction to Number System and Codes Moodle developed By Dr. S. R. Kumbhar Department of
More informationUsing sticks to count was a great idea for its time. And using symbols instead of real sticks was much better.
2- Numbering Systems Tutorial 2-1 What is it? There are many ways to represent the same numeric value. Long ago, humans used sticks to count, and later learned how to draw pictures of sticks in the ground
More informationThe type of all data used in a C++ program must be specified
The type of all data used in a C++ program must be specified A data type is a description of the data being represented That is, a set of possible values and a set of operations on those values There are
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers Prof. Wangrok Oh Dept. of Information Communications Eng. Chungnam National University Prof. Wangrok Oh(CNU) 1 / 51 Overview 1 Course Summary 2 Binary Numbers 3 Number-Base
More informationExcerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997
Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997 APPENDIX A.1 Number systems and codes Since ten-fingered humans are addicted to the decimal system, and since computers
More informationDIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM
COURSE / CODE DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) NUMBER SYSTEM A considerable subset of digital systems deals with arithmetic operations. To understand the
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationNUMBER SYSTEMS AND CODES
C H A P T E R 69 Learning Objectives Number Systems The Decimal Number System Binary Number System Binary to Decimal Conversion Binary Fractions Double-Dadd Method Decimal to Binary Conversion Shifting
More informationChapter 2 Number System
Chapter 2 Number System Embedded Systems with ARM Cortext-M Updated: Tuesday, January 16, 2018 What you should know.. Before coming to this class Decimal Binary Octal Hex 0 0000 00 0x0 1 0001 01 0x1 2
More informationFinal Labs and Tutors
ICT106 Fundamentals of Computer Systems - Topic 2 REPRESENTATION AND STORAGE OF INFORMATION Reading: Linux Assembly Programming Language, Ch 2.4-2.9 and 3.6-3.8 Final Labs and Tutors Venue and time South
More informationData Representation 1
1 Data Representation Outline Binary Numbers Adding Binary Numbers Negative Integers Other Operations with Binary Numbers Floating Point Numbers Character Representation Image Representation Sound Representation
More informationDecimal & Binary Representation Systems. Decimal & Binary Representation Systems
Decimal & Binary Representation Systems Decimal & binary are positional representation systems each position has a value: d*base i for example: 321 10 = 3*10 2 + 2*10 1 + 1*10 0 for example: 101000001
More informationCHAPTER V NUMBER SYSTEMS AND ARITHMETIC
CHAPTER V-1 CHAPTER V CHAPTER V NUMBER SYSTEMS AND ARITHMETIC CHAPTER V-2 NUMBER SYSTEMS RADIX-R REPRESENTATION Decimal number expansion 73625 10 = ( 7 10 4 ) + ( 3 10 3 ) + ( 6 10 2 ) + ( 2 10 1 ) +(
More informationHomework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit
Announcements Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit Quiz 2 Monday on Number System Conversions
More informationCHAPTER 2 (b) : AND CODES
DKT 122 / 3 DIGITAL SYSTEMS 1 CHAPTER 2 (b) : NUMBER SYSTEMS OPERATION AND CODES m.rizal@unimap.edu.my sitizarina@unimap.edu.my DECIMAL VALUE OF SIGNED NUMBERS SIGN-MAGNITUDE: Decimal values of +ve & -ve
More informationa- As a special case, if there is only one symbol, no bits are required to specify it.
Codes A single bit is useful if exactly two answers to a question are possible. Examples include the result of a coin toss (heads or tails), Most situations in life are more complicated. This chapter concerns
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.
ECE-78: Digital Logic Design Fall 6 UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers
More informationELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.
UNSIGNED INTEGER NUMBERS Notes - Unit 4 DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-by-digit representation of a positive integer number (powers of ): DIGIT 3 4 5 6 7 8 9 Number:
More informationKorea University of Technology and Education
MEC52 디지털공학 Binary Systems Jee-Hwan Ryu School of Mechanical Engineering Binary Numbers a 5 a 4 a 3 a 2 a a.a - a -2 a -3 base or radix = a n r n a n- r n-...a 2 r 2 a ra a - r - a -2 r -2...a -m r -m
More informationLecture (03) Binary Codes Registers and Logic Gates
Lecture (03) Binary Codes Registers and Logic Gates By: Dr. Ahmed ElShafee Binary Codes Digital systems use signals that have two distinct values and circuit elements that have two stable states. binary
More informationCHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER
1 CHAPTER TWO Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER 2-1 Data Types 2-2 Complements 2-3 Fixed-Point Representation 2-4 Floating-Point Representation
More informationUNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES
UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES Structure 2.0 Introduction 2.1 Unit Objectives 2.2 Number Systems 2.3 Bits and Bytes 2.4 Binary Number System 2.5 Decimal Number System 2.6 Octal Number System
More informationCHAPTER 2 Data Representation in Computer Systems
CHAPTER 2 Data Representation in Computer Systems 2.1 Introduction 37 2.2 Positional Numbering Systems 38 2.3 Decimal to Binary Conversions 38 2.3.1 Converting Unsigned Whole Numbers 39 2.3.2 Converting
More informationPositional Number System
Positional Number System A number is represented by a string of digits where each digit position has an associated weight. The weight is based on the radix of the number system. Some common radices: Decimal.
More informationLOGIC DESIGN. Dr. Mahmoud Abo_elfetouh
LOGIC DESIGN Dr. Mahmoud Abo_elfetouh Course objectives This course provides you with a basic understanding of what digital devices are, how they operate, and how they can be designed to perform useful
More informationAnnouncement. (CSC-3501) Lecture 3 (22 Jan 2008) Today, 1 st homework will be uploaded at our class website. Seung-Jong Park (Jay)
Computer Architecture (CSC-3501) Lecture 3 (22 Jan 2008) Seung-Jong Park (Jay) http://www.csc.lsu.edu/~sjpark 1 Announcement Today, 1 st homework will be uploaded at our class website Due date is the beginning
More informationNumber Systems CHAPTER Positional Number Systems
CHAPTER 2 Number Systems Inside computers, information is encoded as patterns of bits because it is easy to construct electronic circuits that exhibit the two alternative states, 0 and 1. The meaning of
More informationModule -10. Encoder. Table of Contents
1 Module -10 Encoder Table of Contents 1. Introduction 2. Code converters 3. Basics of Encoder 3.1 Linear encoders 3.1.1 Octal to binary encoder 3.1.2 Decimal to BCD encoder 3.1.3 Hexadecimal to binary
More informationChapter 1 Review of Number Systems
1.1 Introduction Chapter 1 Review of Number Systems Before the inception of digital computers, the only number system that was in common use is the decimal number system which has a total of 10 digits
More informationDigital Logic Lecture 4 Binary Codes
Digital Logic Lecture 4 Binary Codes By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department Outline Introduction. Character coding. Error detection codes. Gray code. Decimal coding.
More informationTopic Notes: Bits and Bytes and Numbers
Computer Science 220 Assembly Language & Comp Architecture Siena College Fall 2010 Topic Notes: Bits and Bytes and Numbers Binary Basics At least some of this will be review, but we will go over it for
More informationCS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq
CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel Al-Ateeq Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture. Communication Office hours (8
More informationD I G I T A L C I R C U I T S E E
D I G I T A L C I R C U I T S E E Digital Circuits Basic Scope and Introduction This book covers theory solved examples and previous year gate question for following topics: Number system, Boolean algebra,
More informationMemory Addressing, Binary, and Hexadecimal Review
C++ By A EXAMPLE Memory Addressing, Binary, and Hexadecimal Review You do not have to understand the concepts in this appendix to become well-versed in C++. You can master C++, however, only if you spend
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers ( 范倫達 ), Ph. D. Department of Computer Science National Chiao Tung University Taiwan, R.O.C. Spring, 2018 ldvan@cs.nctu.edu.tw http://www.cs.nctu.edu.tw/~ldvan/ Outline
More informationComputer Science 324 Computer Architecture Mount Holyoke College Fall Topic Notes: Bits and Bytes and Numbers
Computer Science 324 Computer Architecture Mount Holyoke College Fall 2007 Topic Notes: Bits and Bytes and Numbers Number Systems Much of this is review, given the 221 prerequisite Question: how high can
More informationSolutions - Homework 2 (Due date: October 4 5:30 pm) Presentation and clarity are very important! Show your procedure!
Solutions - Homework 2 (Due date: October 4 th @ 5:30 pm) Presentation and clarity are very important! Show your procedure! PROBLEM 1 (28 PTS) a) What is the minimum number of bits required to represent:
More informationFundamentals of Programming (C)
Borrowed from lecturer notes by Omid Jafarinezhad Fundamentals of Programming (C) Group 8 Lecturer: Vahid Khodabakhshi Lecture Number Systems Department of Computer Engineering Outline Numeral Systems
More informationPositional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal
Positional notation Ch.. /continued Conversions between Decimal and Binary Binary to Decimal - use the definition of a number in a positional number system with base - evaluate the definition formula using
More informationM1 Computers and Data
M1 Computers and Data Module Outline Architecture vs. Organization. Computer system and its submodules. Concept of frequency. Processor performance equation. Representation of information characters, signed
More informationModule 2: Computer Arithmetic
Module 2: Computer Arithmetic 1 B O O K : C O M P U T E R O R G A N I Z A T I O N A N D D E S I G N, 3 E D, D A V I D L. P A T T E R S O N A N D J O H N L. H A N N E S S Y, M O R G A N K A U F M A N N
More informationChapter 2 Number Systems and Codes Dr. Xu
Chapter 2 Number Systems and Codes Dr. Xu Chapter 2 Objectives Selected areas covered in this chapter: Converting between number systems. Decimal, binary, hexadecimal. Advantages of the hexadecimal number
More informationNumber representations
Number representations Number bases Three number bases are of interest: Binary, Octal and Hexadecimal. We look briefly at conversions among them and between each of them and decimal. Binary Base-two, or
More informationMicrocomputers. Outline. Number Systems and Digital Logic Review
Microcomputers Number Systems and Digital Logic Review Lecture 1-1 Outline Number systems and formats Common number systems Base Conversion Integer representation Signed integer representation Binary coded
More informationDigital Systems and Binary Numbers
Digital Systems and Binary Numbers Mano & Ciletti Chapter 1 By Suleyman TOSUN Ankara University Outline Digital Systems Binary Numbers Number-Base Conversions Octal and Hexadecimal Numbers Complements
More informationNumber System (Different Ways To Say How Many) Fall 2016
Number System (Different Ways To Say How Many) Fall 2016 Introduction to Information and Communication Technologies CSD 102 Email: mehwish.fatima@ciitlahore.edu.pk Website: https://sites.google.com/a/ciitlahore.edu.pk/ict/
More informationDEPARTMENT OF ELECTRICAL AND COMPUTER ENGINEERING, THE UNIVERSITY OF NEW MEXICO ECE-238L: Computer Logic Design Fall 2013.
ECE-8L: Computer Logic Design Fall Notes - Chapter BINARY NUMBER CONVERSIONS DECIMAL NUMBER SYSTEM A decimal digit can take values from to 9: Digit-b-digit representation of a positive integer number (powers
More informationBinary. Hexadecimal BINARY CODED DECIMAL
Logical operators Common arithmetic operators, like plus, minus, multiply and divide, works in any number base but the binary number system provides some further operators, called logical operators. Meaning
More informationDLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR
UNIT I Digital Systems: Binary Numbers, Octal, Hexa Decimal and other base numbers, Number base conversions, complements, signed binary numbers, Floating point number representation, binary codes, error
More informationComputer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2
Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2 Instructor: Rob Bergen Applied Computer Science University of Winnipeg Announcements Website is up
More informationCPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS
CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:
More informationGroups of two-state devices are used to represent data in a computer. In general, we say the states are either: high/low, on/off, 1/0,...
Chapter 9 Computer Arithmetic Reading: Section 9.1 on pp. 290-296 Computer Representation of Data Groups of two-state devices are used to represent data in a computer. In general, we say the states are
More informationCPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS
CPE 323 REVIEW DATA TYPES AND NUMBER REPRESENTATIONS IN MODERN COMPUTERS Aleksandar Milenković The LaCASA Laboratory, ECE Department, The University of Alabama in Huntsville Email: milenka@uah.edu Web:
More informationIBM 370 Basic Data Types
IBM 370 Basic Data Types This lecture discusses the basic data types used on the IBM 370, 1. Two s complement binary numbers 2. EBCDIC (Extended Binary Coded Decimal Interchange Code) 3. Zoned Decimal
More informationAnalogue vs. Discrete data
CL 1 Analogue vs. Discrete data analogue data Analogue vs. Discrete data Data is the raw information that is input into the computer. In other words, data is information that is not yet processed by the
More informationComputer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence
GATE Postal Correspondence Computer Sc. & IT 1 Digital Logic Computer Sciencee & Information Technology (CS) 20 Rank under AIR 100 Postal Correspondence Examination Oriented Theory, Practice Set Key concepts,
More informationExperimental Methods I
Experimental Methods I Computing: Data types and binary representation M.P. Vaughan Learning objectives Understanding data types for digital computers binary representation of different data types: Integers
More informationThe Gray Code. Script
Course: B.Sc. Applied Physical Science (Computer Science) Year & Sem.: IInd Year, Sem - IIIrd Subject: Computer Science Paper No.: IX Paper Title: Computer System Architecture Lecture No.: 9 Lecture Title:
More informationDigital Fundamentals
Digital Fundamentals Tenth Edition Floyd Chapter 1 Modified by Yuttapong Jiraraksopakun Floyd, Digital Fundamentals, 10 th 2008 Pearson Education ENE, KMUTT ed 2009 Analog Quantities Most natural quantities
More information