Binary Systems and Codes
|
|
- Valerie Johns
- 5 years ago
- Views:
Transcription
1 Binary Systems and Codes Contents: Number System Number Base Conversions Complements Subtraction with complements Binary Codes: Decimal Codes, Reflected Code, Error detection code, Alphanumeric Code Prepared By Mohammed Abdul kader Assistant Professor, EEE, IIUC
2 Number System In general, in any number system there is an ordered set of symbols known as digits with rules defined for performing arithmetic operations like addition, multiplication etc. A collection of these digits makes a number in general has two parts- integer and fractional. Set apart by a radix point (.), i.e. where (N) r = a n 1 a n 2 a 2 a 1 a o. a 1 a 2. a m Integer portion Radix point Fractional portion N= a number r = radix or base of number system n= number of digits in integer portion m= number of digits in fractional portion a n 1 = most significant digit (MSD) a m = least significant digit (LSD) In general, a number expressed in base-r system has coefficients multiplied by powers of r: a n 1. r n 1 + a n 2. r n a 1. r 1 + a o. r 0 + a 1. r 1 +a 2. r a m. r m For example, ( ) 10 can be written as
3 Numbers with different Base Decimal (Base 10) Binary (Base 2) Octal (Base 8) Hexadecimal (Base 16) A B C D E F 3
4 Following Conversions are necessary: a) Other base (binary, octal, hexadecimal) to decimal b) Decimal to other base. c) Binary to Octal and Hexadecimal d) Octal and Hexadecimal Conversion a) Any base to decimal Binary to Decimal: Convert binary into decimal = =(10.375) 10 Octal to Decimal: Convert octal into decimal. (630.4) 8 = 6 X X 8+ 4 X 8-1 = (408.5) 10 Number Base Conversions Hexadecimal to Decimal: (A9F5.DE) 16 = Similar as previous conversions, only consider base as 16. 4
5 b) Decimal to any base Decimal to Binary: Convert ( ) 10 to binary. Number Base Conversions (Cont.) Conversion of integer part: integer Reminder Conversion of fractional Part: integer Fraction X X X X (0.6875) 10 =(0.1011) 2 (41) 10 = (101001) 2 5
6 Number Base Conversions (Cont.) Decimal to Octal: Convert ( ) 10 to Octal Integer Part Fractional Part Integer Reminder Integer Fraction X X X X X X Answer: ( ) 10 = ( ) 8 Decimal to Hexadecimal: Divide integer part by 16 and multiply fractional part by 16. 6
7 c) Binary to Octal and Hexadecimal Numbers Since 2 3 =8 and 2 4 = 16, each octal digit corresponds to three binary digits and each hexadecimal digit corresponds to four binary digits. The conversion from binary to octal is easily accomplished by partitioning the binary numbers into groups of three digit each, starting from the binary point and proceeding to the left and to the right. Number Base Conversions (Cont.) Conversion from binary to hexadecimal is similar, except that the binary numbers is divided into groups of four digits: 7
8 Number Base Conversions (Cont.) d) Conversion of Octal and Hexadecimal Numbers Conversion from octal to hexadecimal or hexadecimal to octal is so easy if we follow the following procedure: 8
9 Number Base Conversions (Cont.) Usefulness of Octal and Hexadecimal Numbers A common question may arise, Human are used to in decimal number and digital systems works with binary number. So, why should we use octal and hexadecimal numbers? Binary numbers are difficult to work with because they require three or four times as many digits as their decimal equivalent. For example, the binary number is equivalent to decimal 4096 (hexadecimal FFF and Octal 7777). However, digital computers use binary numbers and it is sometimes necessary for the programmer or human operators or user to communicate directly by means of binary numbers. When dealing with large number of binary bits, it is more convenient and less error-prone to write the binary numbers in octal or, decimal or, hexadecimal because the numbers can be expressed more compactly. Among these three octal and hexadecimal are more useful than decimal because it is relatively easy to convert back and forth between binary and Hex/Octal. 9
10 Complements Why we use complement? Complements are used in digital computers for simplifying the subtraction operation and for logical manipulations. Types: There are two types of complements for each base-r system: a) The r s complement and b) The (r-1) s complement. r s complement is known as 10 s complement in base 10 and 2 s complement in base 2. (r-1) s complement is known as 9 s complement in base 10 and 1 s complement in base 2. 10
11 The r s complement: Complements (Cont.) Given a positive number N in base r with an integer part of n digits, the r s complement of N is defined as The r s complement of N = rn N, if N 0 0, if N = 0 Examples: 10 s complement of = = s complement of = = s complement of = = s complement of (101100) 2 = (2 6 ) 10 -(101100) 2 = ( ) 2 = s complement of (0.0110) 2 = (2 0 ) =
12 Complements (Cont.) Finding r s complement (Simple Method): From the definition and examples, it is clear that- 10 s complement of a decimal number can be formed >> By leaving all lest significant zero's unchanged. >> subtracting the first nonzero least significant digit from 10 >> subtracting other higher significant digits from 9 Example: 10 s complement of = = s complement of = = s complement can be formed by- >> leaving all least significant zero and the first nonzero digit unchanged. >> then replacing 1 s by 0 s and 0 s by 1 s in all other higher significant digits. Example: 2 s complement of (101100) 2 = (2 6 ) 10 -(101100) 2 =
13 Complements (Cont.) The (r-1) s complement: Given a positive number N in base r with an integer part of n digits and a fractional part of m digits, the (r-1) s complement of N is defined as- The (r-1) s complement of N = r n -r -m -N Examples: 9 s complement of (52520) 10 =( )= s complement of (0.3267) 10 is ( ) = s complement of (25.693) 10 is ( )= s complement of (101100) 2 is ( ) 10 -(101100) 2 = = s complement of (0.0110) 2 is ( ) 10 -(0.0110) 2 =
14 Complements (Cont.) Finding (r-1) s complement (Simple Method): >> 9 s complement of a decimal number is formed simply by subtracting every digit from 9 >> 1 s complement of a binary number is simpler: the 1 s are changed to 0 s and the 0 s to 1 s. Example: 9 s complement of (25.693) 10 is ( )= s complement of (101100) 2 is ( ) 10 -(101100) 2 = Note: It is worth mentioning that the complement of the complement restores the number to it s original value. r s complement of N =r n -N and r s complement of (r n -N) is (r n -(r n -N)) =N and similarly for the 1 s complement. 14
15 Subtraction with r s Complements Subtraction with Complements The direct method of subtraction taught in elementary schools uses the borrow concept. This seems to be easiest when people perform subtraction with paper and pencil. When subtraction is implemented by means of digital components, this method is found to be less efficient than the method that uses complements and addition as stated below: Subtraction of two positive numbers (M-N), both of base r, may be done as follows- Step-1: Add the minuend M to the r s complement of subtrahend N. Step-2: Inspect the result obtained in step 1 for an end carry: (a) If an end carry occurs, discard it. (b) if an end carry does not occur, take the r s complement of the number obtained in step 1 and place a negative sign in front. 15
16 Subtraction with Complements (Cont.) Subtraction with r s Complements (Examples) Using 10 s complement, subtract Let, M=72532 and N= 3250 M= s complement of N= End carry Answer: Subtract ( ) 10 Let, M=3250 and N= M= s complement of N= No carry Answer: - (10 s complement of 30718) = M= and N= Calculate (M-N)? M= s complement of N = End carry Answer: M= and N= , Calculate (M-N) M= s complement of N= No carry Answer: -(2 s complement of ) =
17 Subtraction with Complements (Cont.) Subtraction with r s Complements Proof of the procedure: Addition of M to r s complement of N is given by (M+r n -N) For numbers having an integer part of n digits, r n is equal to a 1 in the (n+1)th position (end carry). Since M and N assumed to be positive, then: (a) (M+r n -N) r n if M N or (b) (M+r n -N) < r n if M<N In case of (a) the answer is positive and equal to (M-N), which is directly obtained by discarding the end carry r n. In case of (b) the answer is negative and equal to (N-M). This case is detected from the absence of an end carry. The answer is obtained by taking a second complement and adding a negative sign: -[r n+ -(M+r n -N)] = -(N-M) 17
18 Subtraction with Complements (Cont.) Subtraction with (r-1) s Complements The subtraction of M-N, both positive number in base r, may be calculated in the following manner: Step-1: Add the minuend M to the (r-1) s complement of the subtrahend N. Step-2: Inspect the result obtained in step 1 for an end carry. (a) If an end carry occurs, add 1 to the list significant digit (end-round carry) (b) If an end carry does not occurs, take the (r-1) s complement of the number obtained in step 1 and place a negative sign in front. 18
19 Subtraction with Complements (Cont.) Subtraction with (r-1) s Complements (Example) M=72532 and N=3250. Determine M-N and N-M by 9 s complement. Finding (M-N) M= s complement of N = End round carry Finding (N-M) N = s complement of M = No carry Answer: -(9 s complement of 30717) = M= and N= Determine (M-N) and (N-M)? Finding (M-N) M= s complement of N= End round carry Answer: Finding (N-M) N= s complement of M= No carry Answer: -(1 s complement of ) =
20 Comparison between 1 s and 2 s Complement s complement is easier to implement by digital computer than 2 s complement The 1 s complement has the advantage of being easier to implement by digital components since the only thing that must be done is to change 0 s into 1 s and 1 s into 0 s. The implementation of 2 s complement may be obtained in two ways: (i) by adding 1 to the least significant digit of the 1 s complement and (ii) by leaving all leading 0 s in the least significant positions and the first 1 unchanged, and only then changing all 1 s into 0 s and all 0 s into 1 s. Subtraction by 2 s complement requires less arithmetic operation. During subtraction of two numbers by complements, the 2 s complement is advantageous in that only one arithmetic operation is required. The 1 s complement requires two arithmetic additions when an end-around carry occurs. 20
21 Comparison between 1 s and 2 s Complement (Cont.) s complement has two arithmetic zeros. The 1 s complement has the additional disadvantages of possessing two arithmetic zeros: one with all 0 s and one with all 1 s. To illustrate this fact, consider the subtraction of the two equal binary numbers =0 Using 1 s Complement Complement again to obtain Using 2 s Complement While the 2 s complement has only one arithmetic zero, the 1 s complement zero can be positive or negative, which may complicate matters. 21
22 Binary Codes When numbers, letters or words are represented by a special group of binary symbols/combinations, we say that they are being encoded and the group of symbols is called a code. Some familiar binary codes are- Decimal Codes, Error-detection Codes, The Reflected Code, Alphanumeric Codes etc. Decimal Codes The representation of decimal digits by binary combinations is known as decimal codes. Binary codes from decimal digits require minimum of four bits. Numerous different codes can be obtained by arranging four or more bits in ten distinct possible combinations. Some decimal codes are- BCD Excess (Biquinary) 22
23 Decimal Codes (Cont.) Binary-Coded-Decimal (BCD) Code If each digit of a decimal number is represented by its binary equivalent, the result is a code called binary coded decimal (BCD). It is possible to assign weights to the binary bits according to their positions. The weights in the BCD code are 8,4,2,1. Binary Codes (Cont.) Problem: Convert (BCD) into its decimal equivalent. Convert 955 (decimal) into BCD code. 23
24 Binary Codes (Cont.) Decimal Codes (Cont.) Excess-3 Code This is an unweighted code. Its code assignment is obtained from the corresponding value of BCD after the addition of 3. It has been used in some old computers. Table 2 represents excess-3 code for corresponding decimal digits. 8,4,-2,-1 Code Negative weights can be assigned to decimal digits by 8, 4, -2, -1. In this case the bit combination 0110 is interpreted as the decimal digit 2, as obtained from 24 8x0 + 4x1 + (-2)x1 + (-1)x0 = 2. 2,4,2,1 Code This one is another weighted code corresponding to the decimal digit. In this case the bit combination 1011 is interpreted as the decimal digit 5, as obtained from 2x1 + 4x0 + 2x1 + 1x1 = 5.
25 Decimal Codes (Cont.) Biquinary Code Binary Codes (Cont.) The weights in the biquinary code are 5, 0, 4, 3, 2, 1, 0. The biquinary code is an example of a seven bit code with error detection properties. Each decimal digit consists of five 0 s and two 1 s placed in the corresponding weighted column. During transmission of signals from one location to another, an error may occur. One or more bits may change value. A circuit in the receiving side can detect the presence of more (or less) than two 1 s and if the received combination of bits does not agree with the allowable combination, an error is detected. Self-complementary Decimal Codes From the five binary codes discussed above, the BCD seems the most natural to use and is indeed the one most commonly encountered. The other four-bit codes listed have one characteristic in common that is not found in BCD. The excess-3, the 2, 4, 2, 1 and the 8, 4, -2, -1 are self-complementary codes, that is, the 9 s complement of the decimal number is easily obtained by changing 1 s to 0 s and 0 s to 1 s. (in a 25
26 Decimal Codes (Cont.) Binary Codes (Cont.) binary code) and subtraction is calculated by means of 9 s complement. For example, the decimal 395 is represented in the 2, 4, 2, 1 code by Its 9 s complement 604 is represented by , which is easily obtained from the replacement of 1 s by 0 s and 0 s by 1 s. This property is useful when arithmetic operations are internally done with decimal numbers 26
27 Binary Codes (Cont.) Error-detection Codes An error detection codes can be used to detect errors during transmission. A parity bit is an extra bit included with a message to make the total number of 1 s either odd or even. For a message of four bits parity (P) is chosen so that the sum of all 1 s is odd (in all five bits) or the sum of all 1 s is even. In the receiving end, all the incoming bits (in this case five) are applied to a parity-check network for checking. An error is detected if the check parity does not correspond to the adopted one. The parity method detects the presence of one, three or any odd combination of errors. An even combination of errors is undetectable. 27
28 Error-detection Codes Binary Codes (Cont.) Message Add parity bit TX Bit error in the channel Rcv Check Parity Message error if parity even
29 The Reflected Code/Grey Code The Reflected code, also called Gray code is unweighted and is not an arithmetic code; that is, there are no specific weights assigned to the bit positions. It is a binary numeral system where two successive values differ in only one bit (binary digit). For instance, in going from decimal 3 to decimal 4, the Gray code changes from 0010 to 0110, while the binary code Binary Codes (Cont.) changes from 0011 to 0100, a change of three bits. The only bit change is in the third bit from the right in the Gray code; the others remain the same. 29
30 Alphanumeric Codes Binary Codes (Cont.) In order to communicate, we need not only numbers, but also letters and other symbols. In the strictest sense, alphanumeric codes are codes that represent numbers and alphabetic characters (letters). Most such codes, however, also represent other characters such as symbols and various instructions necessary for conveying information. The ASCII is the most common alphanumeric code. ASCII Code ASCII is the abbreviation for American Standard Code for Information Interchange. Pronounced "askee," ASCII is a universally accepted alphanumeric code used in most computers and other electronic equipment. Most computer keyboards are standardized with the ASCII. When we enter a letter, a number, or control command, the corresponding ASCII code goes into the computer. 30
31 Binary Codes (Cont.) ASCII Code (Cont.) ASCII has 128 characters and symbols represented by a 7-bit binary code. Actually, ASCII can be considered an 8-bit code with the MSB always 0. This 8-bit code is 00 through 7F in hexadecimal. The first thirty-two ASCII characters are non-graphic commands that are never printed or displayed and are used only for control purposes. Examples of the control characters are ""null," "line feed," "start of text," and "escape." The other characters are graphic symbols that can be printed or displayed and include the letters of the alphabet (lowercase and uppercase), the ten decimal digits, punctuation signs and other commonly used symbols. Extended ASCII characters : In addition to the 128 standard ASCII characters, there are an additional 128 characters that were adopted by IBM for use in their PCs (personal computers). Because of the popularity of the PC, these particular extended ASCII characters are also used in applications other than PCs and have become essentially an unofficial standard. The extended ASCII 31 characters are represented by an 8-bit code series from hexadecimal 80 to hexadecimal FF.
32 ASCII Code (Cont.) Binary Codes (Cont.) 32
33 ASCII Code (Cont.) Binary Codes (Cont.) 33
Lecture (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 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 informationBINARY 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 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 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 informationBinary Codes. Dr. Mudathir A. Fagiri
Binary Codes Dr. Mudathir A. Fagiri 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
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 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 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 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 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 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 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 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 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 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 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 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 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 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 informationin this web service Cambridge University Press
978-0-51-85748- - Switching and Finite Automata Theory, Third Edition Part 1 Preliminaries 978-0-51-85748- - Switching and Finite Automata Theory, Third Edition CHAPTER 1 Number systems and codes This
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 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 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 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 informationChap 1. Digital Computers and Information
Chap 1. Digital Computers and Information Spring 004 Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal] Arithmetic Operations Base Conversion
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 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 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 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 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 and Computer Design Fundamentals. Chapter 1 Digital Computers and Information
Logic and Computer Design Fundamentals Chapter 1 Digital Computers and Information Overview Digital Systems and Computer Systems Information Representation Number Systems [binary, octal and hexadecimal]
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 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 informationMC1601 Computer Organization
MC1601 Computer Organization Unit 1 : Digital Fundamentals Lesson1 : Number Systems and Conversions (KSB) (MCA) (2009-12/ODD) (2009-10/1 A&B) Coverage - Lesson1 Shows how various data types found in digital
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 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 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 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 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 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 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 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 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 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 informationChapter 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
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 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 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 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 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 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 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 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 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 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 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 informationDec Hex Bin ORG ; ZERO. Introduction To Computing
Dec Hex Bin 0 0 00000000 ORG ; ZERO Introduction To Computing OBJECTIVES this chapter enables the student to: Convert any number from base 2, base 10, or base 16 to any of the other two bases. Add and
More informationMYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes
DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes Hamming Codes 1. DATA REPRESENTATION Information that a Computer
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 informationElectronics Engineering ECE / E & T
STUDENT COPY DIGITAL ELECTRONICS 1 SAMPLE STUDY MATERIAL Electronics Engineering ECE / E & T Postal Correspondence Course GATE, IES & PSUs Digital Electronics 2015 ENGINEERS INSTITUTE OF INDIA. All Rights
More informationUNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS
UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS (09 periods) Computer Arithmetic: Data Representation, Fixed Point Representation, Floating Point Representation, Addition and
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 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 informationNumeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:
Numeral Systems -Numeral System -Positional systems -Decimal -Binary -Octal Subjects: Introduction A numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical
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 informationEE 109 Unit 6 Binary Arithmetic
EE 109 Unit 6 Binary Arithmetic 1 2 Semester Transition Point At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is
More informationSemester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC
1 2 Semester Transition Point EE 109 Unit 11 Binary Arithmetic At this point we are going to start to transition in our class to look more at the hardware organization and the low-level software that is
More information10.1. Unit 10. Signed Representation Systems Binary Arithmetic
0. Unit 0 Signed Representation Systems Binary Arithmetic 0.2 BINARY REPRESENTATION SYSTEMS REVIEW 0.3 Interpreting Binary Strings Given a string of s and 0 s, you need to know the representation system
More informationBits, Words, and Integers
Computer Science 52 Bits, Words, and Integers Spring Semester, 2017 In this document, we look at how bits are organized into meaningful data. In particular, we will see the details of how integers are
More informationInternal Data Representation
Appendices This part consists of seven appendices, which provide a wealth of reference material. Appendix A primarily discusses the number systems and their internal representation. Appendix B gives information
More informationNumber Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr
Number Systems and Binary Arithmetic Quantitative Analysis II Professor Bob Orr Introduction to Numbering Systems We are all familiar with the decimal number system (Base 10). Some other number systems
More informationGet Free notes at Module-I One s Complement: Complement all the bits.i.e. makes all 1s as 0s and all 0s as 1s Two s Complement: One s complement+1 SIGNED BINARY NUMBERS Positive integers (including zero)
More informationplc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums
plc numbers - 3. 3. NUMBERS AND DATA Topics: Number bases; binary, octal,, hexa Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;
More informationDATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes. Error Detection Codes
1 DATA REPRESENTATION Data Types Complements Fixed Point Representations Floating Point Representations Other Binary Codes Error Detection Codes 2 Data Types DATA REPRESENTATION Information that a Computer
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 informationNumber 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
More information1.1 Information representation
Fundamentals of Data Representation: Before we jump into the world of number systems, we'll need a point of reference; I recommend that you copy the following table that you can refer to throughout this
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 informationNumber Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as:
N Number Systems Standard positional representation of numbers: An unsigned number with whole and fraction portions is represented as: a n a a a The value of this number is given by: = a n Ka a a a a a
More informationCOE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:
COE 0: Digital Logic Design Number Systems Part Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: -34 Objectives Arithmetic operations: Binary number system Other number systems Base Conversion
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 informationCMPS 10 Introduction to Computer Science Lecture Notes
CMPS Introduction to Computer Science Lecture Notes Binary Numbers Until now we have considered the Computing Agent that executes algorithms to be an abstract entity. Now we will be concerned with techniques
More informationLecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee
١ Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance, medical
More informationChapter 3: part 3 Binary Subtraction
Chapter 3: part 3 Binary Subtraction Iterative combinational circuits Binary adders Half and full adders Ripple carry and carry lookahead adders Binary subtraction Binary adder-subtractors Signed binary
More informationumber Systems bit nibble byte word binary decimal
umber Systems 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. To perform useful operations on these
More informationECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration
ECE 20B, Winter 2003 Introduction to Electrical Engineering, II Instructor: Andrew B Kahng (lecture) Email: abk@eceucsdedu Telephone: 858-822-4884 office, 858-353-0550 cell Office: 3802 AP&M Lecture: TuThu
More informationComputer Organization
Computer Organization It describes the function and design of the various units of digital computers that store and process information. It also deals with the units of computer that receive information
More informationCC411: Introduction To Microprocessors
CC411: Introduction To Microprocessors OBJECTIVES this chapter enables the student to: Use number { base 2, base 10, or base 16 }. Add and subtract binary/hex numbers. Represent any binary number in 2
More information(+A) + ( B) + (A B) (B A) + (A B) ( A) + (+ B) (A B) + (B A) + (A B) (+ A) (+ B) + (A - B) (B A) + (A B) ( A) ( B) (A B) + (B A) + (A B)
COMPUTER ARITHMETIC 1. Addition and Subtraction of Unsigned Numbers The direct method of subtraction taught in elementary schools uses the borrowconcept. In this method we borrow a 1 from a higher significant
More informationBinary Addition. Add the binary numbers and and show the equivalent decimal addition.
Binary Addition The rules for binary addition are 0 + 0 = 0 Sum = 0, carry = 0 0 + 1 = 0 Sum = 1, carry = 0 1 + 0 = 0 Sum = 1, carry = 0 1 + 1 = 10 Sum = 0, carry = 1 When an input carry = 1 due to a previous
More informationCourse Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation
Course Schedule CS 221 Computer Architecture Week 3: Information Representation (2) Fall 2001 W1 Sep 11- Sep 14 Introduction W2 Sep 18- Sep 21 Information Representation (1) (Chapter 3) W3 Sep 25- Sep
More informationTHE LOGIC OF COMPOUND STATEMENTS
CHAPTER 2 THE LOGIC OF COMPOUND STATEMENTS Copyright Cengage Learning. All rights reserved. SECTION 2.5 Application: Number Systems and Circuits for Addition Copyright Cengage Learning. All rights reserved.
More informationComputer Logical Organization Tutorial
Computer Logical Organization Tutorial COMPUTER LOGICAL ORGANIZATION TUTORIAL Simply Easy Learning by tutorialspoint.com tutorialspoint.com i ABOUT THE TUTORIAL Computer Logical Organization Tutorial Computer
More informationThis tutorial gives a complete understanding on Computer Logical Organization starting from basic computer overview till its advanced architecture.
About the Tutorial Computer Logical Organization refers to the level of abstraction above the digital logic level, but below the operating system level. At this level, the major components are functional
More informationDigital codes. Resources and methods for learning about these subjects (list a few here, in preparation for your research):
Digital codes This worksheet and all related files are licensed under the Creative Commons Attribution License, version 1.0. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/,
More informationAgenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010
// EE : INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN Lecture : Introduction /9/ Avinash Kodi, kodi@ohio.edu Agenda Go over the syllabus Introduction ti to Digital it Systems // Why Digital Systems?
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 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 information