©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g.7475 10 The magnitude.

Slides:



Advertisements
Similar presentations
A digital system is a system that manipulates discrete elements of information represented internally in binary form. Digital computers –general purposes.
Advertisements

Chapter 4: The Building Blocks: Binary Numbers, Boolean Logic, and Gates Invitation to Computer Science, C++ Version, Third Edition.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 3 Dr. Shi Dept. of Electrical and Computer Engineering.
Binary Math CS208. Decimal Addition Example ) Add = 15 Write down 5, carry ) Add = 8 Write down 8 3)
VIT UNIVERSITY1 ECE 103 DIGITAL LOGIC DESIGN CHAPTER I NUMBER SYSTEMS AND CODES Reference: M. Morris Mano & Michael D. Ciletti, "Digital Design", Fourth.
Binary Operations Math/Logical. Binary Math Decimal Addition Example ) Add = 15 Write down 5, carry ) Add 3 +
Lecture 3. Boolean Algebra, Logic Gates
Chapter 1 The Big Picture. QUIZ 2 5 Explain the abstractions we normally apply when using the following systems: DVD player Registering for classes on.
Number Systems & Logic Gates Day 2. Octal Number System Base (Radix)8 Digits0, 1, 2, 3, 4, 5, 6, 7 e.g = =648 1 =88 0 =1 The digit.
Chapter 1 Number Systems and Codes 1. Outline 1. NUMBER SYSTEMS AND CODES 2. DIGITAL ELECTRONIC SIGNALS AND SWITCHES 3. BASIC LOGIC GATES 4. PROGRAMMABLE.
Dr. Bernard Chen Ph.D. University of Central Arkansas
Lecture 3. Boolean Algebra, Logic Gates Prof. Sin-Min Lee Department of Computer Science 2x.
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
Numbering systems.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
Binary Codes Computers and other digital systems "work" with binary numbers. I/P & O/P is usually done using decimal numbers, alphabetics, special symbols.
Basic Arithmetic (adding and subtracting)
Logic and Digital System Design - CS 303
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 2 Number.
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION.
Yuh-Jzer JoungDigital Systems1 Number Systems decimal number : 7397=7× × × ×10 0 a 4 a 3 a 2 a 1 a 0. a -1 a -2 = a 4 ×10 4 +a 3 ×10.
Logic Design Dr. Yosry A. Azzam. Binary systems Chapter 1.
مدار منطقي مظفر بگ محمدي Course Structure & Grading Homework: 25% Midterm: 30% Final:50% There is 5% extra! ( =105!) Textbook:
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
Digital Logic Design Week 3
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Chapter 1: Digital Computers and Information Illustration at beginning of each Chapter Base 10 Binary Base 2 Octal Base 8 Hex bas
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
1 Lect # 1 Binary Systems Digital vs. Analog Analog – a continuous range of values Digital – a discrete set of values –Like money –Can’t get smaller than.
1 Lecture 3 ENGRE 254 1/14/09. 2 Lecture 1 review Digital signals assume two values represented by “0” and “1”. Typically a “0” represents a voltage near.
Sneha.  Gates Gates  Characteristics of gates Characteristics of gates  Basic Gates Basic Gates  AND Gate AND Gate  OR gate OR gate  NOT gate NOT.
Logic Gates. The Inverter The inverter (NOT circuit) performs the operation called inversion or complementation. Standard logic symbols: 1 1 input output.
1 EG 32 Digital Electronics Thought for the day You learn from your mistakes..... So make as many as you can and you will eventually know everything.
AEEE2031 Data Representation and Numbering Systems.
Tutorial: ITI1100 Dewan Tanvir Ahmed SITE, UofO
Addition and Substraction
1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Logic Gates. A logic gate is an elementary building block of a digital circuit. Most logic gates have two inputs and one output. At any given moment,
Logic Design CS221 1 st Term combinational circuits Cairo University Faculty of Computers and Information.
Chapter 1: Binary Systems
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Binary Numbers For digital systems, the.
Chapter 1 : Introduction to Binary Systems 1.1. Introduction to Digital Systems 1.2. Binary Numbers 1.3. Number Base Conversion 1.4. Octal and Hexadecimal.
1 Ethics of Computing MONT 113G, Spring 2012 Session 4 Binary Addition.
ECE DIGITAL LOGIC LECTURE 4: BINARY CODES Assistant Prof. Fareena Saqib Florida Institute of Technology Fall 2016, 01/26/2016.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
BINARY SYSTEMS ENGR. KASHIF SHAHZAD 1. BINARY NUMBERS 1/2 Internally, information in digital systems is of binary form groups of bits (i.e. binary numbers)
1’S COMPLEMENT REPRESENTATION 1’s complement of a number (binary) is obtained by changing all 1’s to 0 and all 0’s to 1. If one of these numbers is positive.
DATA REPRESENTATION IN COMPUTER MEMORY.  Describe the coding system:  Sign and magnitude  1’s Complement and 2’s Complement  Binary Coded Decimal.
COMPUTER ORGANIZATION 4 TH LECTURE. ASCII Code  ASCII ( American Standard Code for Information Interchange).  Input and output devices that communicate.
Chapter 1 Digital Systems and Binary Numbers
Computer Code.
CHAPTER 1 INTRODUCTION NUMBER SYSTEMS AND CONVERSION
CHAPTER 1 : INTRODUCTION
Chapter 3 Data Representation
Chapter 1 Digital Systems and Binary Numbers
Fundamentals & Ethics of Information Systems IS 201
University of Gujrat Department of Computer Science
INTRODUCTION TO LOGIC DESIGN Chapter 1 Digital Systems and Binary Numbers gürtaçyemişçioğlu.
Digital Electronics & Logic Design
Digital Logic & Design Lecture 05
ME 4447/6405 Microprocessor Control of Manufacturing Systems and
Digital Systems and Binary Numbers
13 Digital Logic Circuits.
2’s Complement form 1’s complement form 2’s complement form
Table 1.1 Powers of Two.
ECE 331 – Digital System Design
Presentation transcript:

©zaher elsir Sudan Academy for Banking & Financial Sciences Decimal Number System Base (Radix)10 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9 e.g The magnitude represented by a digit is decided by the position of the digit within the number. For example the digit 7 in the left-most position of 7475 counts for 7000 and the digit 7 in the second position from the right counts for

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Number System Base (Radix)2 Digits0, 1 e.g The digit 1 in the third position from the right represents the value 4 and the digit 1 in the fourth position from the right represents the value = =2 2 2=2 1 1=2 0

©zaher elsir Sudan Academy for Banking & Financial Sciences Octal Number System Base (Radix)8 Digits0, 1, 2, 3, 4, 5, 6, 7 e.g The digit 2 in the second position from the right represents the value 16 and the digit 1 in the fourth position from the right represents the value = = = =8 0

©zaher elsir Sudan Academy for Banking & Financial Sciences Hexadecimal Number System Base (Radix)16 Digits0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F e.g. 2F4D 16 The digit F in the third position from the right represents the value 3840 and the digit D in the first position from the right represents the value =16 3 F 256= =16 1 D 1=16 0

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Arithmetic Addition Complements Subtraction

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Addition Carry Bit (a) (b) (c)(d)

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Addition Example –1–1 –1–1 –1–1–1–1–1–1 –0–0–1–1–0–0–0–0–1–1–1–1 –Example 1: Add –binary to –Col 1) Add = 1 – Write 1 –Col 2) Add = 1 – Write 1 –Col 3) Add = 2 (10 in binary) – Write 0, carry 1 –Col 4) Add = 2 – Write 0, carry 1 –Col 6) Add = 2 – Write 0, carry 1 –Col 5) Add = 3 (11 in binary) – Write 1, carry 1 –Col 7) Bring down the carried 1 – Write 1

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Addition Verification Verification  = = –1–1–0–0–1–1–0–0–0–0–1–1–1–1 –You can always check your –answer by converting the figures to decimal, doing the addition, and comparing the answers.

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Addition Examples (a)(b)(c) (d) (e)

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Substraction Borrow Bit (a) (b) (c)(d)

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Subtraction Example –Example 1: Subtract –binary from –2–2 –0–0–0–0–2–2 –1–1 –2–2 –1–1–1–1–0–0–1–1 Col 1) Subtract 1 – 0 = 1 Col 5) Try to subtract 0 – 1  can’t. Must borrow from next column. Col 4) Subtract 1 – 1 = 0 Col 3) Try to subtract 0 – 1  can’t. Must borrow 2 from next column. But next column is 0, so must go to column after next to borrow. Add the borrowed 2 to the 0 on the right. Now you can borrow from this column (leaving 1 remaining). Col 2) Subtract 1 – 0 = 1 Add the borrowed 2 to the original 0. Then subtract 2 – 1 = 1 –1–1 Add the borrowed 2 to the remaining 0. Then subtract 2 – 1 = 1 Col 6) Remaining leading 0 can be ignored.

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Subtraction Verification Verification  = = –2–2 –0–0–0–0–2–2 –1–1 –2–2 –1–1–1–1–0–0–1–1–1–1 –Subtract binary –11100 from :

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Subtraction Example –Example 2: Subtract –binary from –2–2–0–0–0–0–2–2 –1–1–1–1–0–0–1–1–0–0 Verification  = = 21 10

©zaher elsir Sudan Academy for Banking & Financial Sciences Example Binary Complement (1s Complement) Operation

©zaher elsir Sudan Academy for Banking & Financial Sciences Two’s Complement The Two’s complement of a binary number is obtained by first complementing the number and then adding 1 to the result One’s Complement Two’s Complement

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Subtraction Binary subtraction is implemented by adding the Two’s complement of the number to be subtracted. Example If there is a carry then it is ignored. Thus, the answer is Two’s complement of 1001

©zaher elsir Sudan Academy for Banking & Financial Sciences Binary Codes BCD – Binary Coded Decimal ASCII – American Standard Code for Information Interchange A binary code is a group of n bits that assume up to 2 n distinct combinations of 1’s and 0’s with each combination representing one element of the set that is being coded.

©zaher elsir Sudan Academy for Banking & Financial Sciences BCD – Binary Coded Decimal Decimal BCD Number When the decimal numbers are represented in BCD, each decimal digit is represented by the equivalent BCD code. Example :BCD Representation of Decimal

©zaher elsir Sudan Academy for Banking & Financial Sciences ASCII Number ASCIILetter ASCII A B C D E F G H I

©zaher elsir Sudan Academy for Banking & Financial Sciences ASCII Continued. J K L M N O P Q R Letter ASCIILetter ASCII S T U V W X Y Z

©zaher elsir Sudan Academy for Banking & Financial Sciences Logic Gates Binary information is represented in digital computers by physical quantities called signals. Two different electrical voltage levels such as 3 volts and 0.5 volts may be used to represent binary 1 and 0. Binary logic deals with binary variables and with operations that assume a logical meaning.

©zaher elsir Sudan Academy for Banking & Financial Sciences Logic Gates Contd… A particular logic operation can be described in an algebraic or tabular form. The manipulation of binary information is done by the circuits called logic gates which are blocks of hardware that produce signals of binary 1 or 0 when input logic requirements are satisfied.

©zaher elsir Sudan Academy for Banking & Financial Sciences Logic Gates Contd… Each gate has a distinct graphics symbol and it’s operation can be described by means of an algebraic expression or in a form of a table called the truth table. Each gate has one or more binary inputs and one binary output.

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates AND OR NOT (Inverter) NAND (Not AND) NOR (Not OR) XOR (Exclusive-OR) Exclusive-NOR

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. AND Logic GateTruth Table A B x A B x A, B Binary Input Variables x Binary Output Variable x = A. B

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. ORLogic Gate Truth Table A B x A B x x = A + B This is read as x equals A or B.

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. NOTLogic GateTruth Table A x x A x = A

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. NANDLogic GateTruth Table A B x A B x x = A. B

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. NORLogic GateTruth Table A B x A B x x = A + B

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. XORLogic GateTruth Table A B x A B x x = A + B

–© zaher elsir –Sudan Academy for Banking & Financial Sciences Logic Gates Cont. Exclusive-NOR Logic GateTruth Table A B x A B x x = A + B