Number Systems and Codes Discussion D4.1. Number Systems Counting in Binary Positional Notation Hexadecimal Numbers Negative Numbers.

Slides:



Advertisements
Similar presentations
NUMBER SYSTEM. How to convert hexadecimal numbers to decimal numbers? 230 Working from right to left, MULTIPLY each position with 8 raised to the power.
Advertisements

ICS312 Set 2 Representation of Numbers and Characters.
HEXADECIMAL NUMBERS Code
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Digital to Analog (D/A) Converter Discussion D2.2.
Number Systems Discussion D4.1 Appendix C. Number Systems Counting in Binary Positional Notation Hexadecimal Numbers Negative Numbers.
ECE 331 – Digital System Design
Binary Subtraction Section 3-9 Mano & Kime. Binary Subtraction Review from CSE 171 Two’s Complement Negative Numbers Binary Adder-Subtractors 4-bit Adder/Subtractor.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Introduction to Computer Engineering by Richard E. Haskell Number Systems Module M3.1 Sections
Digital to Analog (D/A) Converter Discussion D2.2.
Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding ’s complement Ignore carry.
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Digital Circuits. Analog and Digital Signals Noise margins in Logic Circuits VMVM.
ENGIN112 L3: More Number Systems September 8, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 3 More Number Systems.
Number System and Codes
EE 261 – Introduction to Logic Circuits
1 Lecture 2: Number Systems Binary numbers Base conversion Arithmetic Number systems  Sign and magnitude  Ones-complement  Twos-complement Binary-coded.
1.6 Signed Binary Numbers.
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
Number Systems Binary and Hexadecimal. Base 2 a.k.a. Binary  Binary works off of base of 2 instead of a base 10 like what we are taught in school 
#1 Lec # 2 Winter EECC341 - Shaaban Positional Number Systems A number system consists of an order set of symbols (digits) with relations.
1 Homework Turn in HW2 tonight HW3 is on-line already Questions?
Chapter 3 Data Representation
Binary Arithmetic & Data representation
ECEN2102 Digital Logic Design Lecture 1 Numbers Systems Abdullah Said Alkalbani University of Buraimi.
ICS312 Set 1 Representation of Numbers and Characters.
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Number System Chapter 3 Subject: Digital System Year: 2009.
CPU Internal memory I/O interface circuit System bus
ECE 301 – Digital Electronics Unsigned and Signed Numbers, Binary Arithmetic of Signed Numbers, and Binary Codes (Lecture #2)
Summer 2012ETE Digital Electronics1 Binary Arithmetic of Signed Binary Numbers.
Positional Number Systems
Number Systems Decimal (Base 10) –10 digits (0,1,2,3,4,5,6,7,8,9) Binary (Base 2) –2 digits (0,1) Digits are often called bits (binary digits) Hexadecimal.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
ECE 2110: Introduction to Digital Systems Signed Addition/Subtraction.
Operations on Bits Arithmetic Operations Logic Operations
Number Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
ECE 331 – Digital System Design Representation and Binary Arithmetic of Negative Numbers and Binary Codes (Lecture #10) The slides included herein were.
Chapter 3 Complements Dr. Bernard Chen Ph.D. University of Central Arkansas Spring 2009.
Chapter 2 Bits, Data Types, and Operations. 2-2 Hexadecimal Notation It is often convenient to write binary (base-2) numbers as hexadecimal (base-16)
ECE 301 – Digital Electronics Representation of Negative Numbers, Binary Arithmetic of Negative Numbers, and Binary Codes (Lecture #11) The slides included.
Two’s Complement. A system used to represent a negative number in binary A system used to represent a negative number in binary Positive numbers start.
Addition and Substraction
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Introduction to Microprocessors Chapter 2. Decimal or Base 10 Numbers  Have ten different digits (0-9)  It is a weighted number system. Each position.
WEEK #2 NUMBER SYSTEMS, OPERATION & CODES (PART 1)
Irvine, Kip R. Assembly Language for Intel-Based Computers 6/e, Signed Integers The highest bit indicates the sign. 1 = negative, 0 = positive.
Bits, Data types, and Operations: Chapter 2 COMP 2610 Dr. James Money COMP
NUMBER SYSTEMS.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
IT1004: Data Representation and Organization Negative number representation.
1 Digital Logic Design Lecture 2 More Number Systems/Complements.
CCE Department – Faculty of engineering - Islamic University of Lebanon Chapter 6 Binary Arithmetic.
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
Arithmetic Chapter 4 Subject: Digital System Year: 2009.
Exercise 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Digital Logic Design Lab 1,2 By Nora Alaqeel.
Lecture 1.2 (Chapter 1) Prepared by Dr. Lamiaa Elshenawy
Advanced Binary b. describe and use two’s complement and sign and magnitude to represent negative integers; c. perform integer binary arithmetic, that.
COMPUTER ARITHMETIC Binary Coded Decimal Presented By Chung Wai Chow.
Chapter 3 Data Representation
Binary / Hex Binary and Hex The number systems of Computer Science.
Unit 18: Computational Thinking
Number Systems Rayat Shikshan Sanstha’s
Number Systems Rayat Shikshan Sanstha’s
ECE 331 – Digital System Design
Presentation transcript:

Number Systems and Codes Discussion D4.1

Number Systems Counting in Binary Positional Notation Hexadecimal Numbers Negative Numbers

Counting in Binary Position: BINARY HEX

Counting in Binary Position: A1010A 1011B1011B 1100C1100C 1101D1101D 1110E1110E 1111F1111F BINARY HEX

Counting in Binary BINARY DEC

Positional Notation N = P 4 P 3 P 2 P 1 P 0 = P 4 b 4 + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b = 5 x x x 10 0 = = 584

Positional Notation N = P 4 P 3 P 2 P 1 P 0 = P 4 b 4 + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b = 1 x x x x x 2 0 = = Binary

Positional Notation N = P 4 P 3 P 2 P 1 P 0 = P 4 b 4 + P 3 b 3 + P 2 b 2 + P 1 b 1 + P 0 b 0 3AF 16 = 3 x A x F x 16 0 = 3 x x x 1 = = Hex

Binary Hex A86A8 F5 C

Questions What is the decimal value of ? 2 x x 5+3 = = 73

Negative Numbers Subtract by adding ’s complement Ignore carry

Negative Numbers 10’s complement : Subtract from Take 9’s complement and add

Negative Numbers 2’s complement: Subtract from Take 1’s complement and add

Finding 2’s Complement Copy all bits to first 1 2’s complement 0001 Complement remaining bits 0101

Negative Number Take 2’s Complement = 4B 16 = = B5 16 = FF -4B B4 +1 B5

Negative Number Take 2’s Complement 1 10 = = = FF 16 = = = = =

Signed Numbers 4-bit: 8H = -8 to 7H = to bit: 80H = -128 to 7F = bit: 8000H = -32,768 to 7FFFH = +32, bit: H = -2,147,483,648 to 7FFFFFFFH = +2,147,483,647

Questions What is the two’s complement of ?

Questions What hex number represents the decimal number -40? = = ’s comp = D8 16

Gray Code Note that the least significant bit that can be changed without repeating a value is the bit that is changed Binary Gray Code

Binary-Coded Decimal (BCD) Use 4-bit binary numbers 0000 – 1001 to represent the decimal digits, 0 – 9. Note that the six hex values A – F, 1010 – 1111, are NOT valid BCD values. Example: represents the hex value = However, as a BCD number it represents the decimal number 95.

Standard ASCII Codes