CPEN 214 - Digital Logic Design Binary Systems



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

NUMBER SYSTEMS. 1.1 Introduction

Goals. Unary Numbers. Decimal Numbers. 3,148 is s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

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

CSI 333 Lecture 1 Number Systems

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

Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Lecture 11: Number Systems

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

Chapter 1: Digital Systems and Binary Numbers

Binary Numbers. Binary Octal Hexadecimal

3. Convert a number from one number system to another

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

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

Useful Number Systems

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

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

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

Chapter 2. Binary Values and Number Systems

Unsigned Conversions from Decimal or to Decimal and other Number Systems

Computer Science 281 Binary and Hexadecimal Review

Binary Representation

Binary, Hexadecimal, Octal, and BCD Numbers

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

Base Conversion written by Cathy Saxton

Number and codes in digital systems

Lecture 2. Binary and Hexadecimal Numbers

Number Systems. Introduction / Number Systems

Number Representation

NUMBER SYSTEMS. William Stallings

plc numbers Encoded values; BCD and ASCII Error detection; parity, gray code and checksums

Positional Numbering System

Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems

COMPSCI 210. Binary Fractions. Agenda & Reading

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

A Step towards an Easy Interconversion of Various Number Systems

=

Systems I: Computer Organization and Architecture

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

Chapter Binary, Octal, Decimal, and Hexadecimal Calculations

Section 1.4 Place Value Systems of Numeration in Other Bases

Numbering Systems. InThisAppendix...

Number Systems and Radix Conversion

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

Levent EREN A-306 Office Phone: INTRODUCTION TO DIGITAL LOGIC

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

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

Binary Adders: Half Adders and Full Adders

Binary Division. Decimal Division. Hardware for Binary Division. Simple 16-bit Divider Circuit

This 3-digit ASCII string could also be calculated as n = (Data[2]-0x30) +10*((Data[1]-0x30)+10*(Data[0]-0x30));

THE BINARY NUMBER SYSTEM

Lecture 8: Binary Multiplication & Division

COMBINATIONAL CIRCUITS

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Decimal to Binary Conversion

Today. Binary addition Representing negative numbers. Andrew H. Fagg: Embedded Real- Time Systems: Binary Arithmetic

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

Computer Science PLUS I Volume 1 : Concepts Government of Tamilnadu

CS321. Introduction to Numerical Methods

BINARY CODED DECIMAL: B.C.D.

Chapter 4: Computer Codes

Verilog - Representation of Number Literals

Solution for Homework 2

CS201: Architecture and Assembly Language

2010/9/19. Binary number system. Binary numbers. Outline. Binary to decimal

Byte Ordering of Multibyte Data Items

Divide: Paper & Pencil. Computer Architecture ALU Design : Division and Floating Point. Divide algorithm. DIVIDE HARDWARE Version 1

COURSE TITLE: INTRODUCTION TO COMPUTER DESIGN

Memory is implemented as an array of electronic switches

Upon completion of unit 1.1, students will be able to

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Binary Number System. 16. Binary Numbers. Base 10 digits: Base 2 digits: 0 1

Modbus RTU Communications RX/WX and MRX/MWX

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

Digital Electronics Detailed Outline

Digital codes. Resources and methods for learning about these subjects (list a few here, in preparation for your research):

Addition Methods. Methods Jottings Expanded Compact Examples = 15

NUMBER SYSTEMS APPENDIX D. You will learn about the following in this appendix:

Lecture N -1- PHYS Microcontrollers

Data Storage. 1s and 0s

MACHINE INSTRUCTIONS AND PROGRAMS

AN617. Fixed Point Routines FIXED POINT ARITHMETIC INTRODUCTION. Thi d t t d ith F M k Design Consultant

Technical Support Bulletin Nr.18 Modbus Tips

Solve addition and subtraction word problems, and add and subtract within 10, e.g., by using objects or drawings to represent the problem.

ELEG3924 Microprocessor Ch.7 Programming In C

Sistemas Digitais I LESI - 2º ano

Binary Numbering Systems

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Logic Reference Guide

Z80 Instruction Set. Z80 Assembly Language

Lab 17: Building a 4-Digit 7-Segment LED Decoder

The Answer to the 14 Most Frequently Asked Modbus Questions

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

HOMEWORK # 2 SOLUTIO

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6

Digital Logic Design

EE360: Digital Design I Course Syllabus

MEP Y9 Practice Book A

Copyright 2012 Pearson Education, Inc. Chapter 1 INTRODUCTION TO COMPUTING AND ENGINEERING PROBLEM SOLVING

Transcription:

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 Human eye A digital system has a set of discrete values Digital Thermometer Compact Disc (CD) Digital camera

Benefits of using digital Analog signal Digital signal Advantages of using Digital: Cheap electronic circuits Easier to calibrate and adjust Resistance to noise: Clearer picture and sound Binary System Discrete elements of information are represented with bits called binary codes. Example: (9) = () (5) = () Question: Why are commercial products made with digital circuits as opposed to analog? Most digital devices are programmable: By changing the program in the device, the same underlying hardware can be used for many different applications.

Decimal Code Review the decimal number system. MSD Base (Radix) is - symbols (,,.. 9) Digits For Numbers > 9, add more significant digits in position to the left, e.g. 9>9. Each position carries a weight. Weights: 3 3 LSD If we were to write 936.5 using a power series expansion and base arithmetic: 3 + 9 + 3 + 6 + + 5 Binary number system The binary number system. Base is - symbols (,) - Binary Digits (Bits) For Numbers >, add more significant digits in position to the left, e.g. >. Each position carries a weight (using decimal). MSD Weights: 3 3 If we write. using a decimal power series we convert from binary to decimal: 4 3 + + + + + + = = 6 + 8+ 4+ + +.5+.5 = 3.5 LSD

Binary number system (.) = (? ) ANS: 48.4375 In computer work: =4 is referred as K = kilo =48576 is referred as M = mega 3 =? 4 =? What is the exact number of bytes in a 6 Gbyte memory module? Octal/Hex number systems The octal number system [from Greek: ΟΚΤΩ]. Its base is 8 eight digits,,, 3, 4, 5, 6, 7 (36.4) 8 = (? ) 8 + 3 8 + 6 8 + 4 8 = 58. 5 The hexadecimal number system [from Greek: ΕΚΑΕΞΙ]. Its base is 6 first digits are borrowed from the decimal system and the letters A, B, C, D, E, F are used for the digits,,, 3, 4, 5 (D63FA) 6 = (? ) 4 3 3 6 + 6 6 + 3 6 + 5 6 + 6 = 87756

Conversion from Decimal to Binary Conversion from decimal to binary: Let each bit of a binary number be represented by a variable whose subscript = bit positions, i.e., ( ) a Its decimal equivalent is: = ( aa ) ( + + ) = ( a + a + a ) It is necessary to separate the number into an integer part and a fraction: Repeatedly divide the decimalnumber by. Conversion from Decimal to Binary Find the binary equivalent of 37. 37 8 9 4 = 8 +.5 = 9 + = 4 +.5 = + = + = +.5 LSB 37 = MSB 53 =? ANS: 53 =

Conversion from Decimal to Binary Conversion from decimal fraction to binary: same method used for integers except multiplication is used instead of division. Convert (.854) to binary (give answer to 6 digits)..854 x = +.784 a - = MSB.784 x = +.468 a - =.468 x = +.8336 a -3 =.8336 x = +.667 a -4 =.6675 x = +.3344 a -5 =.3344 x = +.6688 a -6 = LSB (.854) = = (. a a a 3a 4a 5a 6) (.) (53.854) = (? ) Conversion from Decimal to Octal Conversion from decimal to octal: The decimal number is first divided by 8. The remainder is the LSB. The quotient is then divide by 8 and the remainder is the next significant bit and so on. Convert to octal. 8 8 4 8 7 8 = 4 +.5 = 7 +.5 = +.5 = +.5 R R4 R R = 4 8 LSB MSB

Table - page: 8 Decimal Hex Binary 3 3 4 4 5 5 6 6 7 7 8 8 9 9 A B C 3 D 4 E 5 F Octal 3 4 5 6 7 3 4 5 6 7 Conversion using Table Conversion from and to binary, octal, and hexadecimal plays and important part in digital computers. since 3 = 8 and 4 = 6 each octal digit corresponds to 3 binary digits and each hexa digit corresponds to 4 binary digits. (. ) = (74.3) 8 (. ) = (6FD.34) 6 from table

s and s Complements s complement of N = ( n -) N (N is a binary #) s complement can be formed by changing s to s and s to s s complement of a number is obtained by leaving all least significant s and the first unchanged, and replacing s with s and s with in all higher significant digits. The s complement of = The s complement of = Find the s and s-complement of Answer: and Subtraction Using Complements Subtraction with digital hardware using complements: Subtraction of two n-digit unsigned numbers M N base r:. Add M to the r s complement of N: M + (r n N). If M N, the sum will produce an end carry and is equal to r n that can be discarded. The result is then M N. 3. If M N, the sum will not produce an end carry and is equal to r n (N M)

Binary Subtraction using complements Binary subtraction is done using the same procedure. Subtract using s complement: A = s complement of B = + Sum = Discard end carry = Answer = end carry Subtract using s complement: Answer = Binary Subtraction using complements Subtract using s complement: A = s complement of B = + Sum = End-around carry = + Answer = Subtract using s complement: Answer =

Arithmetic addition Negative numbers must be initially in s complement form and if the obtained sum is negative, it is in s complement form. + 6 +3 +9 6 +3 +7 Add 6 and 3 Answer = Transfer of Information with Registers J

Binary Information Processing