1 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 exchanges digital camera electronic calculators, PDA's digital TV Discrete information-processing systems manipulate discrete elements of information
2 Signal An information variable represented by physical quantity For digital systems, the variable takes on discrete values Two level, or binary values are the most prevalent values Binary values are represented abstractly by: digits 0 and 1 words (symbols) False (F) and True (T) words (symbols) Low (L) and High (H) and words On and Off. Binary values are represented by values or ranges of values of physical quantities
3 Digital System A digital system is an interconnection of digital modules. To understand the operation of each digital module, it is necessary to have a basic knowledge of digital circuits and their logical function. A major trend in digital design methodology is the use of a HDL to describe and simulate the functionality of a digital circuit, it is important that students become familiar with an HDL based design methodology.
4 Binary Numbers Decimal number Base or radix a 5 a 4 a 3 a 2 a 1.a 1 a 2 a 3 a j Decimal point Power 10 a 10 a 10 a 10 a 10 a 10 a 10 a 10 a 10 a Example: , General form of base-r system a r a r a r a r a a r a r a r n n 1 2 m n n 1 2m Coefficient: a j = 0 to r 1
5 Binary Numbers Example: Base-2 number ( ) (26.75) Example: Base-5 number (4021.2) (511.5) 10 Example: Base-8 number (127.4) (87.5) 10 Example: Base-16 number (B65 F) (46,687)
6 Binary Numbers Example: Base-2 number (110101) (53) 10 Special Powers of (1024) is Kilo, denoted "K" 2 20 (1,048,576) is Mega, denoted "M" 2 30 (1,073, 741,824)is Giga, denoted "G" Powers of two Table 1.1
7 Arithmetic operation Arithmetic operations with numbers in base r follow the same rules as decimal numbers.
8 Binary Arithmetic Single Bit Addition with Carry Multiple Bit Addition Single Bit Subtraction with Borrow Multiple Bit Subtraction Multiplication BCD Addition
10 Number-Base Conversions Name Radix Digits 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 The six letters (in addition to the 10 integers) in hexadecimal represent: 10, 11, 12, 13, 14, and 15, respectively.
11 Number-Base Conversions Example1.1 Convert decimal 41 to binary. The process is continued until the integer quotient becomes 0.
12 Number-Base Conversions The arithmetic process can be manipulated more conveniently as follows:
13 Number-Base Conversions Example 1.2 Convert decimal 153 to octal. The required base r is 8. Example1.3 Convert (0.6875) 10 to binary. The process is continued until the fraction becomes 0 or until the number of digits has sufficient accuracy.
14 Number-Base Conversions Example1.3 To convert a decimal fraction to a number expressed in base r, a similar procedure is used. However, multiplication is by r instead of 2, and the coefficients found from the integers may range in value from 0 to r 1 instead of 0 and 1.
15 Number-Base Conversions Example1.4 Convert (0.513) 10 to octal. From Examples 1.1 and 1.3: ( ) 10 = ( ) 2 From Examples 1.2 and 1.4: ( ) 10 = ( ) 8
16 Octal and Hexadecimal Numbers Numbers with different bases: Table 1.2.
17 Octal and Hexadecimal Numbers Conversion from binary to octal can be done by positioning the binary number into groups of three digits each, starting from the binary point and proceeding to the left and to the right. ( ) 2 = ( ) Conversion from binary to hexadecimal is similar, except that the binary number is divided into groups of four digits: Conversion from octal or hexadecimal to binary is done by reversing the preceding procedure.
18 Complements of Numbers There are two types of complements for each base-r system: the radix complement and diminished radix complement. the r's complement and the second as the (r 1)'s complement. Diminished Radix Complement Example: For binary numbers, r = 2 and r 1 = 1, so the 1's complement of N is (2 n 1) N. Example:
19 Complements of Numbers Radix Complement The r's complement of an n-digit number N in base r is defined as r n N for N 0 and as 0 for N = 0. Comparing with the (r 1) 's complement, we note that the r's complement is obtained by adding 1 to the (r 1) 's complement, since r n N = [(r n 1) N] + 1. Example: Base-10 The 10's complement of is The 10's complement of is Example: Base-10 The 2's complement of is The 2's complement of is
20 Complements of Numbers Subtraction with Complements The subtraction of two n-digit unsigned numbers M N in base r can be done as follows:
21 Complements of Numbers Example 1.5 Using 10's complement, subtract Example 1.6 Using 10's complement, subtract There is no end carry. Therefore, the answer is (10's complement of 30718) =
22 Complements of Numbers Example 1.7 Given the two binary numbers X = and Y = , perform the subtraction (a) X Y and (b) Y X by using 2's complement. There is no end carry. Therefore, the answer is Y X = (2's complement of ) =
23 Complements of Numbers Subtraction of unsigned numbers can also be done by means of the (r 1)'s complement. Remember that the (r 1) 's complement is one less then the r's complement. Example 1.8 Repeat Example 1.7, but this time using 1's complement. There is no end carry, Therefore, the answer is Y X = (1's complement of ) =
24 Signed Binary Numbers To represent negative integers, we need a notation for negative values. It is customary to represent the sign with a bit placed in the leftmost position of the number. The convention is to make the sign bit 0 for positive and 1 for negative. Example: Table 3 lists all possible four-bit signed binary numbers in the three representations.
25 Signed Binary Numbers
26 Signed Binary Numbers Arithmetic Addition The addition of two numbers in the signed-magnitude system follows the rules of ordinary arithmetic. If the signs are the same, we add the two magnitudes and give the sum the common sign. If the signs are different, we subtract the smaller magnitude from the larger and give the difference the sign if the larger magnitude. The addition of two signed binary numbers with negative numbers represented in signed-2's-complement form is obtained from the addition of the two numbers, including their sign bits. A carry out of the sign-bit position is discarded. Example:
27 Binary Codes BCD Code A number with k decimal digits will require 4k bits in BCD. Decimal 396 is represented in BCD with 12bits as , with each group of 4 bits representing one decimal digit. A decimal number in BCD is the same as its equivalent binary number only when the number is between 0 and 9. A BCD number greater than 10 looks different from its equivalent binary number, even though both contain 1's and 0's. Moreover, the binary combinations 1010 through 1111 are not used and have no meaning in BCD.
28 Signed Binary Numbers Arithmetic Subtraction In 2 s-complement form: 1. Take the 2 s complement of the subtrahend (including the sign bit) and add it to the minuend (including sign bit). 2. A carry out of sign-bit position is discarded. Example: ( A ) ( B) ( A ) ( B) ( A ) ( B) ( A ) ( B) ( 6) ( 13) ( ) ( ) (+ 7)
29 Binary Codes Example: Consider decimal 185 and its corresponding value in BCD and binary: BCD Addition
30 Binary Codes Example: Consider the addition of = 760 in BCD: Decimal Arithmetic
31 Binary Codes Other Decimal Codes
32 Binary Codes Gray Code
33 Binary Codes ASCII Character Code
34 Binary Codes ASCII Character Code
35 Binary Codes ASCII Character Code
36 ASCII Character Codes American Standard Code for Information Interchange (Refer to Table 1.7) A popular code used to represent information sent as character-based data. It uses 7-bits to represent: 94 Graphic printing characters. 34 Non-printing characters Some non-printing characters are used for text format (e.g. BS = Backspace, CR = carriage return) Other non-printing characters are used for record marking and flow control (e.g. STX and ETX start and end text areas).
37 ASCII Properties ASCII has some interesting properties: Digits 0 to 9 span Hexadecimal values to Upper case A - Z span to 5A 16. Lower case a - z span to 7A 16. Lower to upper case translation (and vice versa) occurs by flipping bit 6. Delete (DEL) is all bits set, a carryover from when punched paper tape was used to store messages. Punching all holes in a row erased a mistake!
38 Binary Codes Error-Detecting Code To detect errors in data communication and processing, an eighth bit is sometimes added to the ASCII character to indicate its parity. A parity bit is an extra bit included with a message to make the total number of 1's either even or odd. Example: Consider the following two characters and their even and odd parity:
39 Binary Codes Error-Detecting Code Redundancy (e.g. extra information), in the form of extra bits, can be incorporated into binary code words to detect and correct errors. A simple form of redundancy is parity, an extra bit appended onto the code word to make the number of 1 s odd or even. Parity can detect all single-bit errors and some multiple-bit errors. A code word has even parity if the number of 1 s in the code word is even. A code word has odd parity if the number of 1 s in the code word is odd.
40 Binary Storage and Registers Registers A binary cell is a device that possesses two stable states and is capable of storing one of the two states. A register is a group of binary cells. A register with n cells can store any discrete quantity of information that contains n bits. n cells 2 n possible states A binary cell two stable state store one bit of information examples: flip-flop circuits, ferrite cores, capacitor A register a group of binary cells AX in x86 CPU Register Transfer a transfer of the information stored in one register to another one of the major operations in digital system an example
41 Transfer of information
42 The other major component of a digital system circuit elements to manipulate individual bits of information
43 Binary Logic Definition of Binary Logic Binary logic consists of binary variables and a set of logical operations. The variables are designated by letters of the alphabet, such as A, B, C, x, y, z, etc, with each variable having two and only two distinct possible values: 1 and 0, There are three basic logical operations: AND, OR, and NOT.
44 Binary Logic The truth tables for AND, OR, and NOT are given in Table 1.8.
45 Binary Logic Logic gates Example of binary signals
46 Binary Logic Logic gates Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.4 Symbols for digital logic circuits Fig. 1.5 Input-Output signals for gates
47 Binary Logic Logic gates Graphic Symbols and Input-Output Signals for Logic gates: Fig. 1.6 Gates with multiple inputs
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
Binary Numbers Bob Brown Information Technology Department Southern Polytechnic State University Positional Number Systems The idea of number is a mathematical abstraction. To use numbers, we must represent
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
CPEN 4 - Digital Logic Design Binary Systems C. Gerousis Digital Design 3 rd Ed., Mano Prentice Hall Digital vs. Analog An analog system has continuous range of values A mercury thermometer Vinyl records
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
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
Chapter 6 Digital Arithmetic: Operations & Circuits Chapter 6 Objectives Selected areas covered in this chapter: Binary addition, subtraction, multiplication, division. Differences between binary addition
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
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
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.
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
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
Digital Logic Design Introduction A digital computer stores data in terms of digits (numbers) and proceeds in discrete steps from one state to the next. The states of a digital computer typically involve
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
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
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
Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two
Memory Structure Memory is implemented as an array of electronic switches Each switch can be in one of two states 0 or 1, on or off, true or false, purple or gold, sitting or standing BInary digits (bits)
23CH_PHCalter_TMSETE_949118 23/2/2007 1:37 PM Page 1 Binary, Hexadecimal, Octal, and BCD Numbers OBJECTIVES When you have completed this chapter, you should be able to: Convert between binary and decimal
Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: email@example.com Grading 1st Midterm -
COMBINATIONAL CIRCUITS http://www.tutorialspoint.com/computer_logical_organization/combinational_circuits.htm Copyright tutorialspoint.com Combinational circuit is a circuit in which we combine the different
Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how
Chapter 5. Binary, octal and hexadecimal numbers A place to look for some of this material is the Wikipedia page http://en.wikipedia.org/wiki/binary_numeral_system#counting_in_binary Another place that
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
198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book 1 Computer Architecture What do computers do? Manipulate stored
Binary math 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/,
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
A First Book of C++ Chapter 2 Data Types, Declarations, and Displays Objectives In this chapter, you will learn about: Data Types Arithmetic Operators Variables and Declarations Common Programming Errors
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
Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations
Chapter The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base-0 system. When you
CS 16: Assembly Language Programming for the IBM PC and Compatibles First, a little about you Your name Have you ever worked with/used/played with assembly language? If so, talk about it Why are you taking
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...
Arithmetic operations in assembly language Prof. Gustavo Alonso Computer Science Department ETH Zürich firstname.lastname@example.org http://www.inf.ethz.ch/department/is/iks/ Binary! You are probably familiar with
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,
Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order
Network Working Group Request for Comments: 20 Vint Cerf UCLA October 16, 1969 ASCII format for Network Interchange For concreteness, we suggest the use of standard 7-bit ASCII embedded in an 8 bit byte
Lecture 2: Number Representation CSE 30: Computer Organization and Systems Programming Summer Session II 2011 Dr. Ali Irturk Dept. of Computer Science and Engineering University of California, San Diego
REVIEW OF NUMBER SYSTEMS Notes Unit 2 BINARY NUMBER SYSTEM In the decimal system, a decimal digit can take values from to 9. For the binary system, the counterpart of the decimal digit is the binary digit,
Lecture 8: Binary Multiplication & Division Today s topics: Addition/Subtraction Multiplication Division Reminder: get started early on assignment 3 1 2 s Complement Signed Numbers two = 0 ten 0001 two
Binary Numbering Systems April 1997, ver. 1 Application Note 83 Introduction Binary numbering systems are used in virtually all digital systems, including digital signal processing (DSP), networking, and
Technical Support Bulletin Nr.18 Modbus Tips Contents! Definitions! Implemented commands! Examples of commands or frames! Calculating the logical area! Reading a signed variable! Example of commands supported
Chapter 1. Binary, octal and hexadecimal numbers This material is covered in the books: Nelson Magor Cooke et al, Basic mathematics for electronics (7th edition), Glencoe, Lake Forest, Ill., 1992. [Hamilton
Discrete Structures Harriet Fell Javed A. Aslam Rajmohan Rajaraman Eric Ropiak Chris Burrows Ravi Sundaram Discrete Structures Version 2.1 Harriet Fell Javed A. Aslam Rajmohan Rajaraman Eric Ropiak Chris
CSE 2300W DIGITAL LOGIC DESIGN How this class fits into ECE/CSE/EE/CS curricula: Already had at least some computer basics and one programming language. This course will emphasize some of the major inner
CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,
6 March 2015 Today we will be abstracting away the physical representation of logical gates so we can more easily represent more complex circuits. Specifically, we use the shapes themselves to represent
3 Data Storage 3.1 Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: List five different data types used in a computer. Describe how
Character Codes for Modern Computers This lecture covers the standard ways in which characters are stored in modern computers. There are five main classes of characters. 1. Alphabetic characters: upper
1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,
G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal
Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents
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
Page 1 of 5 Unsigned Conversions from Decimal or to Decimal and other Number Systems In all digital design, analysis, troubleshooting, and repair you will be working with binary numbers (or base 2). It
A towards an Easy Interconversion of Various Number Systems Shahid Latif, Rahat Ullah, Hamid Jan Department of Computer Science and Information Technology Sarhad University of Science and Information Technology
Formatting Variables in C-Max 2.0 One of the many new features in C-Max 2.0 is the enhanced formatting now available for variables. This new capability is available in two distinct areas of variable usage:
Sistemas Digitais I LESI - 2º ano Lesson 6 - Combinational Design Practices Prof. João Miguel Fernandes (email@example.com) Dept. Informática UNIVERSIDADE DO MINHO ESCOLA DE ENGENHARIA - PLDs (1) - The
NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html
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/,
Number Bases //9 Goals Numbers Understand binary and hexadecimal numbers Be able to convert between number bases Understand binary fractions COMP37 Introduction to Computer Architecture Unary Numbers Decimal
King Saud University College of Computer and Information Sciences Department of Information Technology CAP240 First semester 1430/1431 Multiple-choice Questions Sheet 7 (Chapter 10) 1. Which error detection
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
4 Operations On Data 4.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, students should be able to: List the three categories of operations performed on
CHAPTER 2 MACHINE INSTRUCTIONS AND PROGRAMS CHAPTER OBJECTIVES In this chapter you will learn about: Machine instructions and program execution, including branching and subroutine call and return operations
Appendix A Scientific Notation and Powers of Ten Calculations A.1 Scientific Notation Often the quantities used in chemistry problems will be very large or very small numbers. It is much more convenient
2/9/9 Binary number system Computer (electronic) systems prefer binary numbers Binary number: represent a number in base-2 Binary numbers 2 3 + 7 + 5 Some terminology Bit: a binary digit ( or ) Hexadecimal
Number Systems Introduction / Number Systems Data Representation Data representation can be Digital or Analog In Analog representation values are represented over a continuous range In Digital representation
Number Systems I CIS008-2 Logic and Foundations of Mathematics David Goodwin firstname.lastname@example.org 11:00, Tuesday 18 th October 2011 Outline 1 Number systems Numbers Natural numbers Integers Rational
Lecture N -1- PHYS 3330 Microcontrollers If you need more than a handful of logic gates to accomplish the task at hand, you likely should use a microcontroller instead of discrete logic gates 1. Microcontrollers
Memory Systems This chapter begins the discussion of memory systems from the implementation of a single bit. The architecture of memory chips is then constructed using arrays of bit implementations coupled
Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how
DRONACHARYA GROUP OF INSTITUTIONS, GREATER NOIDA Affiliated to Mahamaya Technical University, Noida Approved by AICTE DEPARTMENT OF INFORMATION TECHNLOGY Lab Manual for Computer Organization Lab ECS-453
CS3 Introduction to Numerical Methods Lecture Number Representations and Errors Professor Jun Zhang Department of Computer Science University of Kentucky Lexington, KY 40506-0633 August 7, 05 Number in
Chapter 4 Register Transfer and Microoperations Section 4.1 Register Transfer Language Digital systems are composed of modules that are constructed from digital components, such as registers, decoders,
DNA Data and Program Representation Alexandre David 1.2.05 email@example.com Introduction Very important to understand how data is represented. operations limits precision Digital logic built on 2-valued
University of Technology Laser & Optoelectronics Engineering Department Digital Electronics lab. Object Exp. No. (2) Exclusive OR Gate and it's pplications To study the logic function of exclusive OR (OR)
Data Storage As mentioned, computer science involves the study of algorithms and getting machines to perform them before we dive into the algorithm part, let s study the machines that we use today to do