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

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

Chapter 2 Number Systems and Codes Dr. Xu

Lecture (02) Operations on numbering systems

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Digital Fundamentals

CHAPTER 2 (b) : AND CODES

Lecture (03) Binary Codes Registers and Logic Gates

Binary Codes. Dr. Mudathir A. Fagiri

Review of Number Systems

Chapter 4: Computer Codes. In this chapter you will learn about:

Chapter 1. Digital Systems and Binary Numbers

MACHINE LEVEL REPRESENTATION OF DATA

Dec Hex Bin ORG ; ZERO. Introduction To Computing

CC411: Introduction To Microprocessors

CHW 261: Logic Design

Thus needs to be a consistent method of representing negative numbers in binary computer arithmetic operations.

LOGIC DESIGN. Dr. Mahmoud Abo_elfetouh

Introduction to Numbering Systems

TOPICS. Other Number Systems. Other Number Systems 9/9/2017. Octal Hexadecimal Number conversion

Digital Fundamentals

Computer Organization

Binary Systems and Codes

Digital Systems and Binary Numbers

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

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

Digital Systems and Binary Numbers

Binary. Hexadecimal BINARY CODED DECIMAL

Module -10. Encoder. Table of Contents

Memory Addressing, Binary, and Hexadecimal Review

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

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

Lecture 2: Number Systems

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

NUMBER SYSTEMS AND CODES

Computer Number Systems Supplement

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Number representations

SE311: Design of Digital Systems

Review of Data Representation & Binary Operations Dhananjai M. Rao CSA Department Miami University

CS & IT Conversions. Magnitude 10,000 1,

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

Number codes nibble byte word double word

Number Systems Base r

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

DIGITAL SYSTEM DESIGN

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

CMPS 10 Introduction to Computer Science Lecture Notes

UNIT 2 NUMBER SYSTEM AND PROGRAMMING LANGUAGES

OBJECTIVES After reading this chapter, the student should be able to:

Numbering systems. Dr Abu Arqoub

Chapter 3 DATA REPRESENTATION

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

Beyond Base 10: Non-decimal Based Number Systems

Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

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

Number Systems. TA: Mamun. References: Lecture notes of Introduction to Information Technologies (ITEC 1011) by Dr Scott MacKenzie

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

Fundamentals of Programming (C)

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

The Gray Code. Script

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

Digital Systems and Binary Numbers

Electronic Data and Instructions

What Is It? Instruction Register Address Register Data Register

umber Systems bit nibble byte word binary decimal

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

Beyond Base 10: Non-decimal Based Number Systems

A Level Computing. Contents. For the Exam:

in this web service Cambridge University Press

Objectives. Connecting with Computer Science 2

Data Representation and Binary Arithmetic. Lecture 2

Excerpt from: Stephen H. Unger, The Essence of Logic Circuits, Second Ed., Wiley, 1997

Signed Binary Numbers

Digital Computers and Machine Representation of Data

Korea University of Technology and Education

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

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

Octal & Hexadecimal Number Systems. Digital Electronics

a- As a special case, if there is only one symbol, no bits are required to specify it.

1.1. INTRODUCTION 1.2. NUMBER SYSTEMS

SCR 1013 : Digital Logic Module 2: NUMBER SYSTEM & CODES

Digital Fundamentals

Conversion Between Number Bases

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

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

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Chap 1. Digital Computers and Information

Number Systems Prof. Indranil Sen Gupta Dept. of Computer Science & Engg. Indian Institute of Technology Kharagpur Number Representation

M1 Computers and Data

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

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

D I G I T A L C I R C U I T S E E

Microcomputers. Outline. Number Systems and Digital Logic Review

Chapter 1 Review of Number Systems

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

Padasalai s - VIRUDHUNAGAR DISTRICT COMMON FIRST MID TERM TEST, JULY 2018 STANDARD 11 COMPUTER APPLICATION

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

MC1601 Computer Organization

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

Transcription:

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 system has a base. The base of a number system determines the total number of unique symbols used by that system.

Decimal Number System

Decimal Number System

Binary Number System The binary number system uses the number 2 as the base. Thus, the only allowable digits are: 0 (Off) and 1 (On).

Binary Number System

Octal Number System The octal number system uses the number 8 as its base, with its eight digits being 0, 1, 2, 3, 4, 5, 6, and 7.

Hexadecimal Number System The hexadecimal (hex) number system uses 16 as its base.

Hexadecimal Number System

Number Conversions To convert a decimal number to its equivalent in any base, you must perform a series of divisions by the desired base. The conversion process starts by dividing the decimal number by the base. If there is a remainder, it is placed in the least significant digit (right-most) position of the new base number. If there is no remainder, a 0 is placed in least significant digit position. The result of the division is then brought down, and the process is repeated until the final result of the successive divisions is 0.

Number Conversion Example: convert decimal to binary The binary equivalent of the decimal number 35 is 100011.

Number Conversion Example: convert decimal to hexadecimal The hexadecimal equivalent of 1355 10 is 54B hex

Negative Numbers Consider the decimal number 23, or binary:10111 2 What about -23? If a minus sign is placed in front of the number, as we do with decimal numbers: (10111) 2 This method is suitable for us, but it is impossible for programmable controllers and computers to interpret, since the only symbols they use are binary 1s and 0s. Therefore, two s compliment is used.

Two s Compliment The two s complement uses an extra digit to represent the sign. In the two s complement computation, each bit (from right to left) is inverted only after the first 1 is detected. Let s use the number +22 decimal as an example: +22 10 = 0 10110 2 Its two s complement would be: 22 10 = 1 01010 2

Binary Codes An important requirement of programmable controllers is communication with various external (I/O) devices. This input/output function involves the transmission, manipulation, and storage of binary data that, at some point, must be interpreted by humans. Binary coding is the process of assigning a unique combination of 1s and 0s to each number, letter, or symbol that must be represented. The most common codes used in the industry are: ASCII BCD Gray

ASC II Alphanumeric codes are used when information processing equipment, such as printers and cathode ray tubes (CRTs), must process the alphabet along with numbers and special symbols. These alphanumeric characters 26 letters (uppercase), 10 numerals (0-9), plus mathematical and punctuation symbols can be represented using a 6-bit code (i.e., 2 6 = 64 possible characters). The most common code for alphanumeric representation is ASCII (the American Standard Code for Information Interchange). Although a 6- bit code (64 possible characters) can accommodate the basic alphabet, numbers, and special symbols, standard ASCII character sets use a 7- bit code (2 7 = 128 possible characters), which provides room for lower case and control characters, in addition to the characters already mentioned.

BCD The binary coded decimal (BCD) system was introduced as a convenient way for humans to Handle numbers that must be input to digital machines Interpret numbers that are output from machines.

BCD

Gray The Gray code is basically a modified binary code where only one bit changes as the counting number increases. This reduces the change of error. Therefore, it is suited primarily for position transducers

Gray

Register Word Format Programmable controller perform all internal operations in binary format using 1s and 0s. In addition, the status of I/O field devices is also read and written, in binary form, to and from the PLC s CPU. Generally, these operations are performed using a group of 16 bits. A PLC word (16-bits) is also called a register.

Reference: Programmable Controllers: Theory and Implementation by Bryan and Bryan