CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq

Size: px
Start display at page:

Download "CS 121 Digital Logic Design. Chapter 1. Teacher Assistant. Hadeel Al-Ateeq"

Transcription

1 CS 121 Digital Logic Design Chapter 1 Teacher Assistant Hadeel Al-Ateeq

2 Announcement DON T forgot to SIGN your schedule OR you will not be allowed to attend next lecture.

3 Communication Office hours (8 hours per Week): Saturday(10-11). Sunday(10-12). Monday (10-11). Tuesday (10-12). Wednesday (10-11) & (12:30-1:30). Blog:

4 Textbook DIGITAL DESIGN, by Mano M. Morris, 4th edition, Prentice- Hall.

5 Grades Evaluation Type Midterm 1 Midterm 2 Quiz 1 Including Date Grade Chapter 1 + chapter 2 Chapter 3 + chapter 4 Chapter 1 + part of chapter 2 Sunday AH (Week # 7) Sunday AH (Week # 12) Quiz 2 Chapter 3 Week # 10 40% Week # 5 5% 4 HW Every chapter % Project After week 15 10% Final All 5 chapters After week 15 40% Total 100%

6 Topics Topics to be covered Digital Systems and Binary numbers Boolean Algebra and Logic Gates Gate Level Minimization Combinational Logic Synchronous Sequential Logic

7 Outline 1.1 Digital Systems 1.2 Binary Numbers 1.3 Number-Base Conversions 1.4 Octal and Hexadecimal Numbers 1.5 Complements 1.6 Signed Binary Numbers 1.7 Binary Codes

8 1.1 Digital Systems (1-2) Digital system is a system that uses discrete values such as numbers and letters. The signal in most digital systems use two values : 0 and 1 which called a bit. Discrete elements of information are represented with a group of bits called binary codes. Thus, Digital system is a system that manipulates discrete elements of information represented internally in binary form.

9 1.1 Digital Systems (2-2) Stores programs, inputs, outputs & intermediate data Data and program prepared by user Input Unit Central Processing Unit Memory Unit Arithmetic & data processing operations Output Unit Receives results of computations and prints them to user Block diagram of a digital Computer

10 1.2 Binary Numbers (1-6) In general, a number expressed in a base-r system has coefficients multiplied by powers of r: a n.r n + a n-1.r n a 2.r 2 + a 1.r + a 0 + a -1.r -1 + a- 2.r a- m.r- m r is called base or radix. a j ranges in thr value from 0 to r-1

11 1.2 Binary Numbers (2-6) Example: (127.4)8 = 1 x x x x 8-1 = (87.5) 10 (1101) 2 = 1 x x x x 2 0 = (13) 10

12 1.2 Binary Numbers (3-6) Numbering System Base Symbols Decimal 10 0, 1, 3, 4, 5, 6, 7, 8, 9 Binary 2 0, 1 Octal 8 0, 1, 3, 4, 5, 6, 7 Hexadecimal 16 0, 1, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F

13 1.2 Binary Numbers (4-6) Arithmetic Operations Follow the same rules of as for decimal numbers Addition Carries Augend Addend Sum Carries Augend Addend Sum

14 1.2 Binary Numbers (5-6) Arithmetic Operations Subtraction Borrows Minuend Subtrahend Difference Borrows Minuend Subtrahend Difference Borrows Minuend Subtrahend Difference

15 1.2 Binary Numbers (6-6) Arithmetic Operations Multiplication Multiplicand 1011 Multiplier X Product

16 1.3 Number-Base Conversions (1-6) Base r to Decimal Conversion Rule: a n.r n + a n-1.r n a 2.r 2 + a 1.r + a 0 + a -1.r -1 + a- 2.r a- m.r- m Integral part a n.r n + a n-1.r n a 2.r 2 + a 1.r + a 0 Fractional part a -1.r -1 + a- 2.r a- m.r- m Result Integral part Fractional part

17 1.3 Number-Base Conversions (2-6) Base r to Decimal Conversion Example: Find the decimal equivalent ofthe binary number ( ) 2. Integral part Fractional part Result 1001 = 1 x x x x 2 0 = = = 0 x x x x 2-4 = = (9.3125) 10

18 1.3 Number-Base Conversions (3-6) Base r to Decimal Conversion Example: ( ) 2 = =(10.375) 10 (127.4) 8 = 1 x x x x 8-1 = (87.5) 10 (1101) 2 = 1 x x x x 2 0 = (13) 10

19 1.3 Number-Base Conversions (4-6) Decimal to Base r Conversion Rule: Convert each part differently. Integral part Fractional part Divide number & its quotients by r. Accumulate reminders. Multiply number & its quotients by r. Accumulate integers. Result Integral part Fractional part

20 1.3 Number-Base Conversions (5-6) Decimal to Base r Conversion Example: Find the binary equivalent of the decimal number (41) 10. Integer 41 Reminder Divide by Result (101001) 2

21 1.3 Number-Base Conversions (6-6) Decimal to Base r Conversion Example: Find the binary equivalent of the decimal number (0.6875) 10. Integer Fraction Multiply by Result (0.1011) 2

22 1.4 Octal and Hexadecimal Numbers (1-17)

23 1.4 Octal and Hexadecimal Numbers (2-17) Decimal-to-Octal Conversion Example: Find the octal equivalent of the decimal number ( ) 10. Divide by 8 Integer Reminder Multiply by 8 Integer Fraction Result ( ) 8

24 1.4 Octal and Hexadecimal Numbers (3-17) Octal-to-Decimal Conversion Example: Find the decimal equivalent ofthe octal number (137.21) 8. Integral part Fractional part Result 137= 1 x x x 8 0 = =95.21 = 2 x x 8-2 =0.265 (95.265) 10

25 1.4 Octal and Hexadecimal Numbers (4-17) Decimal-to-Hexadecimal Conversion Example: Find the hexadecimal equivalent of the decimal number (82.25) 10. Divide by 16 Integer Reminder 82 Multiply by 16 Integer Fraction Result (52.4) 16

26 1.4 Octal and Hexadecimal Numbers (5-17) Hexadecimal-to-Decimal Conversion Example: Find the decimal equivalent ofthe hexadecimal number (1E0.2A) 16. Integral part Fractional part Result 1E0= 1 x x x 16 0 = =480.2A = 2 x x 16-2 =0.164 ( ) 10

27 1.4 Octal and Hexadecimal Numbers (6-17) Binary Octal and Octal Binary Conversions Binary Octal Rule: Divide integral part into three bits starting from right integral bit. Divide fractional part into three bits starting from left fractional bit. Adding zero s if necessary.

28 1.4 Octal and Hexadecimal Numbers (7-17) Binary Octal and Octal Binary Conversions Example: Find the octal equivalent ofthe binary number ( ) ( ) 8

29 1.4 Octal and Hexadecimal Numbers (8-17) Binary Octal and Octal Binary Conversions Octal Binary Rule: BOTH integral and fractional parts: Convert each digit seperately into binary of three bits

30 1.4 Octal and Hexadecimal Numbers (9-17) Binary Octal and Octal Binary Conversions Example: Find the binary equivalent ofthe octal number (374.26) ( ) 2

31 1.4 Octal and Hexadecimal Numbers (10-17) Binary Hex and Hex Binary Conversions Binary Hex Rule: Divide integral part into four bits starting from right integral bit. Divide fractional part into four bits starting from left fractional bit. Adding zero s if necessary.

32 1.4 Octal and Hexadecimal Numbers (11-17) Binary Hex and Hex Binary Conversions Example: Find the hexdecimal equivalent ofthe binary number ( ) (2 C E. 6 E 8) 16

33 1.4 Octal and Hexadecimal Numbers (12-17) Binary Hex and Hex Binary Conversions Hex Binary Rule: BOTH integral and fractional parts: Convert each digit seperately into binary of four bits

34 1.4 Octal and Hexadecimal Numbers (13-17) Binary Hex and Hex Binary Conversions Example: Find the binary equivalent ofthe hexadecimal number (17E.F6) E. F ( ) 2

35 1.4 Octal and Hexadecimal Numbers (14-17) Hex Octal and Octal Hex Conversions Hex Octal Rule: Convert Hex number into binary. Convert the result binary number into octal. OR Convert Hex number into decimal. Convert the result decimal number into octal.

36 1.4 Octal and Hexadecimal Numbers (15-17) Hex Octal and Octal Hex Conversions Example: Find the Hex equivalent ofthe octal number ( ) Binary ( ) 2 Hex (1 F ) 16

37 1.4 Octal and Hexadecimal Numbers (16-17) Hex Octal and Octal Hex Conversions Octal Hex Rule: Convert Octal number into binary. Convert the result binary number into Hex. OR Convert Octal number into decimal. Convert the result decimal number into Hex.

38 1.4 Octal and Hexadecimal Numbers (17-17) Hex Octal and Octal Hex Conversions Example: Find the octal equivalent ofthe Hex number (2F.C4) F. C 4 Binary ( ) 2 Octal ( ) 8 ( ) 8

39 1.5 Complements (1-9) Complement s Types Radix Complement (r s complement) Diminished radix Complement ((r-1) s complement)

40 1.5 Complements (1-9) Diminished Radix Complement ((r-1) s complement) Rule o o Given a number N in base r having n digits, the (r- 1) s complement of N is defined as (r n - 1) -N. Examples o 9 s complement of is = o 1 s complement of is Note The (r-1) s complement of octal or hexadecimal numbers is obtained by subtracting each digit from 7 or F (decimal 15), respectively.

41 1.5 Complements (2-9) Radix Complement Rule o OR o Given a number N in base r having n digit, the r s complement of N is defined as (r n -N) for N 0 and as 0 for N =0. Adding 1 to (r-1) s complement. Examples o The 10 s complement of is o The 10 s complement of is o The 2 s complement of is

42 1.5 Complements (2-9) Note: The complement of the complement restores the number to its origunal value.

43 1.5 Complements (3-9) Subtraction with Complement The subtraction of two n-digit unsigned numbers M N in base r can be done as follows: o M + (r n - N), note that (r n - N) is r s complement of N. o If (M N), the sum will produce an end carry x, which can be discarded; what is left is the result M- N. o If (M < N), the sum does not produce an end carry and is (N - M). Take the r x complement of the sum and place a negative sign in front.

44 1.5 Complements (4-9) Example: Using 10 s complement subtract M = s complement of N = sum = Discard end carry. answer: 69282

45 1.5 Complements (5-9) Example: Using 10 s complement subtract M = s complement of N = sum = The answer is (10 s complement of 30718) =

46 1.5 Complements (6-9) Example: Using 2 s complement subtract M = N = , 2 s complement of N = = Discard end carry. answer:

47 1.5 Complements (7-9) Example: Using 2 s complement subtract M = N = , 2 s complement of N = = The answer is (2 s complement of ) =

48 1.5 Complements (8-9) Example: Using 1 s complement subtract M = N = , 1 s complement of N = = end-around carry = + 1 The answer is:

49 1.5 Complements (9-9) Example: Using 1 s complement subtract M = N = , 1 s complement of N = = No end-around carry Take the 1 s complement of the result with negetive sign. The answer is:

50 1.6 Signed Binary Numbers (1-10) Sign and Magnitude representation Signed complement representation 1 s complement representation 2 s complement representation

51 1.6 Signed Binary Numbers (2-10) Notes: o o o The previous representation (unsigned numbers) are the same for positive numbers and different for negative numbers. For a unsigned binary number the most significant bit of the number. For a signed binary number the most significant bit is used for representing the sign of the number and the rest of the bits represent the number. We use 0 for positive numbers and 1 for negative numbers.

52 1.6 Signed Binary Numbers (3-10) Example: Represent +76 (76) 10 = ( ) 2 Unsigned number (+76) 10 = ( ) 2 (+76) 10 = ( ) 2 (+76) 10 = ( ) 2 Sign & Magnitude 1 s Complement 2 s Complement

53 1.6 Signed Binary Numbers (4-10) Negative numbers: 1 Complement obtained by flipping all bits of the positive binary number 2 Complement obtained by adding 1 to the 1 s Complement. OR: by flipping bits of the positive binary number after the first one from the right

54 1.6 Signed Binary Numbers (5-10) Negative numbers: Sign & Magnitude obtained by changing the left most bit of the positive binary number to 1. Example: Represent -76 (-76) 10 = ( ) 2 (-76) 10 = ( ) 2 (-76) 10 = ( ) 2 Sign & Magnitude 1 s Complement 2 s Complement

55 1.6 Signed Binary Numbers (6-10) Arithmetic Addition: With Comprison The addition of two numbers in the signed & magnitude system follows the rules of ordinary arithmetic: If the signed are the same, we add the two magnitudes and give the sum the common sign. If the signed are different, we subtract the smaller magnitude from the larger and give the difference the sign of the larger magnitude. EX. (+25) + (-38) = -(38-25) = -13

56 1.6 Signed Binary Numbers (7-10) Arithmetic Addition: Without Comprison The addition of two numbers in the signed 2 s complement form is obtained from the addition of the two numbers, including their signed bits. A carry out of the signed bit position is discarded (note that the 4th case of the example). If the result is negetive (left most bot is one), then the must be complemented to extract its value.

57 1.6 Signed Binary Numbers (8-10) Arithmetic Addition: Without Comprison

58 1.6 Signed Binary Numbers (9-10) Arithmetic Subtraction: Rule Change the artithmetic operation into addition. Change the sign of the subtrahend (positive to negative or negative to positive). (+/-) A (+B)= (+/-) A + (-B) (+/-) A (-B)= (+/-) A + (+B)

59 1.6 Signed Binary Numbers (10-10) Arithmetic Subtraction: Example (-6) (-13)= +7 In binary: ( )= ( ) = After removing the carry out the result will be :

60 1.7 Binary Codes (1-24) Any discrete element of information that is distinct among a group of quantities can be represented with a binary code (i.e. a pettern of 0's and 1's). An n-bit binary code is a group of n bits that assumes up to 2" distinct combinations of 1's and 0'r. Each combination representing one element of the set that is being coded. Example A set of four elements can be coded with two bits, with each element assigned one of the following bit combinations:

61 1.7 Binary Codes (2-24) The bit combination of an n-bit code is determined from the count in binary from 0 to 2" - 1. Each element must be assigned a unique binary bit combination and no two elements can have the same value; otherwise. the code assignment will be ambiguous. Minimum number of bits required to code 2" distinct quantities is n. NO Maximum number of bits that may be used for a binary code.

62 1.7 Binary Codes (3-24) BCD Stands for binary-coded decimal. Represents the 10 decimal digits. Each digit is represented in 4 bits. Makes 16 possible combinations. 6 are unassigned. A number with k decimal digits will require 4k bits in BCD. Weight (8,4,2,1.)

63 1.7 Binary Codes (4-24) BCD Example Represent (945) 10 in BCD 3 decimal digits will require (3*4) = 12 bits. Each decimal digit is represented in 4 bits Result ( ) BCD

64 1.7 Binary Codes (5-24) BCD Addition Notes Same as adding two decimal numbers. Sum cannot be greater than 9, such as: 9+9+1=19 with 1 is being a previous carry. If the result value was greater than (1001) 2 =(9) or if the result was more than 4 digits. Then it is an invalid BCD digit. Add (0110) 2 =(6) to convert it to correct digit. A carry will be produced Result more than 4 digit is greater than 9(1001)

65 1.7 Binary Codes (6-24) BCD Addition Example Evaluate (3+4) in BCD System 3 BCD BCD Decimal 0111

66 1.7 Binary Codes (7-24) BCD Addition Example Evaluate (4+8) in BCD System BCD BCD ERROR We must add 6 (0110) to the result

67 1.7 Binary Codes (8-24) BCD Addition Example Evaluate ( ) in BCD System 184 BCD BCD

68 1.7 Binary Codes (9-24) Decimal Arithmetic Signed numbers Signed decimal numbers in BCD similar to signed numbers in binary. Can be signed-magnitude system or signedcomplement system (9 s or 10 s complement) Sign represented with four bits in BCD. + -> 0000 (four 0 s). - -> 1001 (nine).

69 1.7 Binary Codes (10-24) Decimal Arithmetic Addition for signed numbers Apply 10 s complement to the negative number only. Addition is done by summing all digits, including the sign digit,and discarding the end carry. Example (+375) + (- 240) (+0 375) + (9 760) = ( 1135) (end carry is discarded) = (0 135) in BCD

70 1.7 Binary Codes (11-24) Decimal Arithmetic Subtraction For BOTH signed and unsigned numbers: Apply 10 s complement to the subtrahend and apply addition (same as binary case)

71 1.7 Binary Codes (12-24) Other Decimal codes

72 1.7 Binary Codes (13-24) Excess -3 (ex-3) Another system to represent a decimal number. Like (BCD) in the way of representing number (each digit is represented in 4 bits) Except that : each digit is firstly incremented by three

73 1.7 Binary Codes (14-24) Excess -3 (ex-3) Example Represent (945) 10 in ex Result ( ) ex-3

74 1.7 Binary Codes (15-24) Gray Code Output data of many physical systems are quantities that are continuous. Such data must be converted into digital form before they are applied to a digital system using analog-todigital converter. Such converted data represented using Gray code. Used in applications in which the normal sequence of binary numbers may produce an error or ambiguity during the transition from one number to the next. Because only 1bit in the code group changes in going from one number to the next.

75 1.7 Binary Codes (16-24) Gray Code

76 1.7 Binary Codes (17-24) Gray Code

77 1.7 Binary Codes (18-24) ASCII Character Code ASCII : American Standard Code for Information Interchange Used to represent characters, Symbols, Consists of 7-bits (to represent 128 character). A bit can be added to produce a total of eight bits (byte). Used for other purposes.

78 1.7 Binary Codes (19-24) ASCII Character Code # ASCII Ch A B Z a b Upper case Letters are represented by ASCII (65 : 90) Lower case Letters are represented by ASCII (97 : 122) z

79 1.7 Binary Codes (20-24) ASCII Character Code

80 1.7 Binary Codes (21-24) ASCII Character Code

81 1.7 Binary Codes (22-24) ASCII Character Code Error Detecting Code Detecting errors in data communication and processing. Eight bit added to ASCII code. A parity bit is an extra- bit included with a message lo make the total number of 1's either even or odd. Example: even parity odd parity ASCII (A) ASCII (T)

82 1.7 Binary Codes (23-24) ASCII Character Code Error Detecting Code

83 1.7 Binary Codes (24-24) ASCII Character Code Error Detecting Code The eight-bit character that include parity bits are transmitted to their destination. The parity of each character is then checked at the receiving end. If the parity of the received character is not even. then at least one bit has changed value during transmission. Detects one, three or any odd combination of errors in each character that is transmitted. Other detection codes may be needed to take care of that possibility

Korea University of Technology and Education

Korea 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 information

Digital Systems and Binary Numbers

Digital 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 information

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

Computer 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 information

Lecture (02) Operations on numbering systems

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 information

Chapter 1. Digital Systems and Binary Numbers

Chapter 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 information

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

Digital 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 information

Digital Systems and Binary Numbers

Digital 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 information

Digital Systems and Binary Numbers

Digital 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 information

Logic Circuits I ECE 1411 Thursday 4:45pm-7:20pm. Nathan Pihlstrom.

Logic 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 information

BINARY SYSTEM. Binary system is used in digital systems because it is:

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 information

Lecture 2: Number Systems

Lecture 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 information

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

LOGIC 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 information

Lecture (03) Binary Codes Registers and Logic Gates

Lecture (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 information

ECE 20B, Winter Purpose of Course. Introduction to Electrical Engineering, II. Administration

ECE 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 information

Chap 1. Digital Computers and Information

Chap 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 information

SE311: Design of Digital Systems

SE311: 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 information

Chapter 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. 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 information

CHAPTER TWO. Data Representation ( M.MORRIS MANO COMPUTER SYSTEM ARCHITECTURE THIRD EDITION ) IN THIS CHAPTER

CHAPTER 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 information

DIGITAL SYSTEM DESIGN

DIGITAL 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 information

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Moodle 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 information

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

CHAPTER 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 information

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Logic 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 information

Digital Fundamentals

Digital 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 information

Electronics Engineering ECE / E & T

Electronics 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 information

MC1601 Computer Organization

MC1601 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 information

D 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 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 information

CHW 261: Logic Design

CHW 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 information

Binary Systems and Codes

Binary Systems and Codes 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010 1010101010101010101010101010101010101010101010101010101010101010101010101010101010

More information

Review of Number Systems

Review 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 information

CHAPTER 2 (b) : AND CODES

CHAPTER 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 information

Numbering systems. Dr Abu Arqoub

Numbering 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 information

Number Systems Base r

Number 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 information

Number Systems and Conversions UNIT 1 NUMBER SYSTEMS & CONVERSIONS. Number Systems (2/2) Number Systems (1/2) Iris Hui-Ru Jiang Spring 2010

Number 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 information

Positional Number System

Positional 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 information

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

COE 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 information

MACHINE LEVEL REPRESENTATION OF DATA

MACHINE 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 information

CS & IT Conversions. Magnitude 10,000 1,

CS & 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 information

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Numeral 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 information

DIGITAL SYSTEM FUNDAMENTALS (ECE 421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE 422) COURSE / CODE NUMBER SYSTEM

DIGITAL 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 information

Semester Transition Point. EE 109 Unit 11 Binary Arithmetic. Binary Arithmetic ARITHMETIC

Semester 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 information

Computer Organization

Computer 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 information

Digital Fundamentals

Digital 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 information

Agenda EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 1: Introduction. Go over the syllabus 3/31/2010

Agenda 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 information

Binary Addition. Add the binary numbers and and show the equivalent decimal addition.

Binary 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 information

UNIT 7A Data Representation: Numbers and Text. Digital Data

UNIT 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 information

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

Ms 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 information

Number System. Introduction. Decimal Numbers

Number 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 information

Microcomputers. Outline. Number Systems and Digital Logic Review

Microcomputers. 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 information

Chapter 1 Review of Number Systems

Chapter 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 information

Chapter 4. Combinational Logic

Chapter 4. Combinational Logic Chapter 4. Combinational Logic Tong In Oh 1 4.1 Introduction Combinational logic: Logic gates Output determined from only the present combination of inputs Specified by a set of Boolean functions Sequential

More information

in this web service Cambridge University Press

in 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 information

Electronic Data and Instructions

Electronic 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 information

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

MYcsvtu 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 information

Number representations

Number 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 information

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

Digital Systems COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Digital Systems COE 202 Digital Logic Design Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals Welcome to COE 202 Course Webpage: http://faculty.kfupm.edu.sa/coe/mudawar/coe202/ Lecture

More information

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Positional 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 information

Data Representation and Binary Arithmetic. Lecture 2

Data 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 information

EEM 232 Digital System I

EEM 232 Digital System I EEM 232 Digital System I Instructor : Assist. Prof. Dr. Emin Germen egermen@anadolu.edu.tr Course Book : Logic and Computer Design Fundamentals by Mano & Kime Third Ed/Fourth Ed.. Pearson Grading 1 st

More information

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude Chapter 2 Positional number systems A positional number system represents numeric values as sequences of one or more digits. Each digit in the representation is weighted according to its position in the

More information

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

10.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 information

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT COE 202: Digital Logic Design Term 162 (Spring 2017) Instructor: Dr. Abdulaziz Barnawi Class time: U.T.R.: 11:00-11:50AM Class

More information

LOGIC CIRCUITS. Kirti P_Didital Design 1

LOGIC CIRCUITS. Kirti P_Didital Design 1 LOGIC CIRCUITS Kirti P_Didital Design 1 Introduction The digital system consists of two types of circuits, namely (i) Combinational circuits and (ii) Sequential circuit A combinational circuit consists

More information

T02 Tutorial Slides for Week 2

T02 Tutorial Slides for Week 2 T02 Tutorial Slides for Week 2 ENEL 353: Digital Circuits Fall 2017 Term Steve Norman, PhD, PEng Electrical & Computer Engineering Schulich School of Engineering University of Calgary 19 September, 2017

More information

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Lecture (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 information

Fundamentals of Programming (C)

Fundamentals 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

EE 109 Unit 6 Binary Arithmetic

EE 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 information

UNIT - I: COMPUTER ARITHMETIC, REGISTER TRANSFER LANGUAGE & MICROOPERATIONS

UNIT - 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 information

Binary Codes. Dr. Mudathir A. Fagiri

Binary 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 information

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 CS 64 Lecture 2 Data Representation Reading: FLD 1.2-1.4 Decimal Numbers: Base 10 Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 ) + (1x10 0 ) 1010 10?= 1010 2?= 1

More information

DLD VIDYA SAGAR P. potharajuvidyasagar.wordpress.com. Vignana Bharathi Institute of Technology UNIT 1 DLD P VIDYA SAGAR

DLD 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 information

COMP Overview of Tutorial #2

COMP Overview of Tutorial #2 COMP 1402 Winter 2008 Tutorial #2 Overview of Tutorial #2 Number representation basics Binary conversions Octal conversions Hexadecimal conversions Signed numbers (signed magnitude, one s and two s complement,

More information

COMBINATIONAL LOGIC CIRCUITS

COMBINATIONAL LOGIC CIRCUITS COMBINATIONAL LOGIC CIRCUITS 4.1 INTRODUCTION The digital system consists of two types of circuits, namely: (i) Combinational circuits and (ii) Sequential circuits A combinational circuit consists of logic

More information

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

UNIT 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 information

Chapter 1 Emad Felemban

Chapter 1 Emad Felemban Chapter 1 Emad Felemban Digital Computers and Digital Systems Binary Numbers Number Base Conversion Octal and Hexadecimal Numbers Complements Singed Binary Numbers Binary Codes Binary Storage and Registers

More information

CO Computer Architecture and Programming Languages CAPL. Lecture 9

CO Computer Architecture and Programming Languages CAPL. Lecture 9 CO20-320241 Computer Architecture and Programming Languages CAPL Lecture 9 Dr. Kinga Lipskoch Fall 2017 A Four-bit Number Circle CAPL Fall 2017 2 / 38 Functional Parts of an ALU CAPL Fall 2017 3 / 38 Addition

More information

The 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 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 information

Lecture (01) Introduction Number Systems and Conversion (1)

Lecture (01) Introduction Number Systems and Conversion (1) Lecture (01) Introduction Number Systems and Conversion (1) By: Dr. Ahmed ElShafee ١ Digital systems Digital systems are used in communication, business transactions, traffic control, spacecraft guidance,

More information

Digital Fundamentals

Digital 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

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

Number 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 information

IT 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 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 information

Chapter 2. Data Representation in Computer Systems

Chapter 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 information

Basic Definition INTEGER DATA. Unsigned Binary and Binary-Coded Decimal. BCD: Binary-Coded Decimal

Basic 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 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)

(+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 information

Level ISA3: Information Representation

Level ISA3: Information Representation Level ISA3: Information Representation 1 Information as electrical current At the lowest level, each storage unit in a computer s memory is equipped to contain either a high or low voltage signal Each

More information

Excerpt 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 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 information

Introduction to Computers and Programming. Numeric Values

Introduction to Computers and Programming. Numeric Values Introduction to Computers and Programming Prof. I. K. Lundqvist Lecture 5 Reading: B pp. 47-71 Sept 1 003 Numeric Values Storing the value of 5 10 using ASCII: 00110010 00110101 Binary notation: 00000000

More information

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS).

2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS). 2. MACHINE REPRESENTATION OF TYPICAL ARITHMETIC DATA FORMATS (NATURAL AND INTEGER NUMBERS). 2.. Natural Binary Code (NBC). The positional code with base 2 (B=2), introduced in Exercise, is used to encode

More information

Octal and Hexadecimal Integers

Octal and Hexadecimal Integers Octal and Hexadecimal Integers CS 350: Computer Organization & Assembler Language Programming A. Why? Octal and hexadecimal numbers are useful for abbreviating long bitstrings. Some operations on octal

More information

Binary. Hexadecimal BINARY CODED DECIMAL

Binary. 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 information

DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes. Error Detection Codes

DATA 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 information

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS

DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS C H A P T E R 6 DIGITAL ARITHMETIC: OPERATIONS AND CIRCUITS OUTLINE 6- Binary Addition 6-2 Representing Signed Numbers 6-3 Addition in the 2 s- Complement System 6-4 Subtraction in the 2 s- Complement

More information

Goals for this Week. CSC 2400: Computer Systems. Bits, Bytes and Data Types. Binary number system. Finite representations of binary integers

Goals for this Week. CSC 2400: Computer Systems. Bits, Bytes and Data Types. Binary number system. Finite representations of binary integers CSC 2400: Computer Systems Bits, Bytes and Data Types 1 Goals for this Week Binary number system Why binary? Converting between decimal and binary and octal and hexadecimal number systems Finite representations

More information

Bachelor of Computer Application DIGITAL TECHNIQUES. Block-1

Bachelor of Computer Application DIGITAL TECHNIQUES. Block-1 GCA S1 03 1 KRISHNA KANTA HANDIQUI STATE OPEN UNIVERSITY Housefed Complex, Dispur, Guwahati - 781 006 Bachelor of Computer Application DIGITAL TECHNIQUES Block-1 Contents UNIT 1 : Introduction to Number

More information

CS101 Lecture 04: Binary Arithmetic

CS101 Lecture 04: Binary Arithmetic CS101 Lecture 04: Binary Arithmetic Binary Number Addition Two s complement encoding Briefly: real number representation Aaron Stevens (azs@bu.edu) 25 January 2013 What You ll Learn Today Counting in binary

More information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 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 information

CHAPTER 2 Data Representation in Computer Systems

CHAPTER 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 information

Homework 1 graded and returned in class today. Solutions posted online. Request regrades by next class period. Question 10 treated as extra credit

Homework 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 information

9/3/2015. Data Representation II. 2.4 Signed Integer Representation. 2.4 Signed Integer Representation

9/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 information

Chapter 2 Number System

Chapter 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 information

Number 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 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 information