# INTRODUCING BINARY AND HEXADECIMAL NUMBERS

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 CHAPTER INTRODUCING BINARY AND HEXADECIMAL NUMBERS I am ill at these numbers. WILLIAM SHAKESPEARE (564 66) in Hamlet (6) In this chapter we will learn about Counting on fingers and toes Place-value number systems Using powers or exponents The binary number system The hexadecimal number system Counting in the binary and hexadecimal systems Using wires to represent numbers 7

2 8 INTRODUCING BINARY AND HEXADECIMAL NUMBERS Why Do We Need to Know this Stuff? The number system with which we are most familiar is the decimal system, which is based on ten digits,, 2, 3, 4, 5, 6, 7, 8, and 9. As we shall soon discover, however, it s easier for electronic systems to work with data that is represented using the binary number system, which comprises only two digits and. Unfortunately, it s difficult for humans to visualize large values presented as strings of s and s. Thus, as an alternative, we often use the hexadecimal number system, which is based on sixteen digits that we represent by using the numbers through 9 and the letters A through F. Familiarity with the binary and hexadecimal number systems is necessary in order to truly understand how computers and calculators perform their magic. In this chapter, we will discover just enough to make us dangerous, and then we ll return to consider number systems and representations in more detail in Chapters 4, 5, and 6. Counting on Fingers and Toes The first tools used as aids to calculation were almost certainly man s own fingers. It is no coincidence, therefore, that the word digit is used to refer to a finger (or toe) as well as a numerical quantity. As the need grew to represent greater quantities, small stones or pebbles could be used to represent larger numbers than could fingers and toes. These had the added advantage of being able to store intermediate results for later use. Thus, it is also no coincidence that the word calculate is derived from the Latin word for pebble. Throughout history, humans have experimented with a variety of different number systems. For example, you might use one of your thumbs to count the finger joints on the same hand (, 2, 3 on the index finger; 4, 5, 6 on the next finger; up to,, 2 on the little finger). Based on this technique, some of our ancestors experimented with base- 2 systems. This explains why we have special words like dozen, meaning twelve, and gross, meaning one hundred and forty-four (2 2 44). The fact that we have 24 hours in a day (2 2) is also related to these base-2 systems. Similarly, some groups used their fingers and toes for counting, so they ended up with base-2 systems. This is why we still have special

4 INTRODUCING BINARY AND HEXADECIMAL NUMBERS Thousands column Hundreds column Tens column Ones column (6 x ) (2 x ) (4 x ) (9 x ) Figure -. Combining digits and column weights in decimal. Using Powers or Exponents Another way of thinking about this is to use the concept of powers; for example,. This can be written as 2, meaning ten to the power of two or ten multiplied by itself two times. Similarly, 3,, 4, and so forth (Figure -2). Rather than talking about using powers, some mathematicians prefer to refer to this type of representation as an exponential form. In the case of a number like 3, the number being multiplied () is known as the base, whereas the exponent (3) specifies how many times the base is to be multiplied by itself. Thousands column Hundreds column Tens column Ones column 6249 (6 x 3 ) (2 x 2 ) (4 x ) (9 x ) Figure -2. Using powers of ten.

5 COUNTING IN DECIMAL There are a number of points associated with powers (or exponents) that are useful to remember Any base raised to the power of is the base itself, so. Strictly speaking, a power of is not really part of the series. By convention, however, any base to the power of equals, so. A value with an exponent of 2 is referred to as the square of the number; for example, , where 9 (or 3 2 ) is the square of 3. A value with an exponent of 3 is referred to as the cube of the number; for example, , where 27 (or 3 3 ) is the cube of 3. The square of a whole number (,, 2, 3, 4, etc.) is known as a perfect square; for example, 2, 2, 2 2 4, 3 2 9, 4 2 6, , and so on are perfect squares. (The concepts of whole numbers and their cousins are introduced in more detail in Chapter 4.) The cube of a whole number is known as a perfect cube; for example, 3, 3, 2 3 8, , , , and so on are perfect cubes. But we digress. The key point here is that the column weights are actually powers of the number system s base. This will be of particular interest when we come to consider other systems. Counting in Decimal Counting in decimal is easy (mainly because we re so used to doing it). Commencing with, we increment the first column until we get to 9, at which point we ve run out of available digits. Thus, on the next count we reset the first column to, increment the second column to, and continue on our way (Figure -3). Similarly, once we ve reached 99, the next count will set the first column to and attempt to increment the second column. But the second column already contains a 9, so this will also be set to and we ll increment the third column, resulting in, and so it goes.

6 2 INTRODUCING BINARY AND HEXADECIMAL NUMBERS Figure -3. Counting in decimal. The Binary Number System Unfortunately, the decimal number system is not well suited to the internal workings of computers. In fact, for a variety of reasons that will become apparent as we progress through this book, it is preferable to use the binary (base-2) number system, which employs only two digits and. Binary is a place value system, so each column in a binary number has a weight, which is a power of the number system s base. In this case we re dealing with a base of two, so the column weights will be 2, 2 2, 2 2 4, 2 3 8, and so forth (Figure -4). Eights column Fours column Twos column Ones column 2 Binary number ( x 2 3 ) ( x 8) 8 Decimal equivalent 2 ( x 2 2 ) ( x 2 ) ( x 2 ) ( x 4) ( x 2) ( x ) 4 Figure -4. Combining digits and column weights in binary.

7 THE BINARY NUMBER SYSTEM 3 When working with number systems other than decimal, or working with a mixture of number systems as shown in Figure -4, it is common to use subscripts to indicate whichever base is in use at the time. For example, 2 2, which means Binary 2 Decimal. Another common alternative is to prefix numbers with a character to indicate the base; for example, %, where the % indicates a binary value. (In fact there are a variety of such conventions, so you need to keep your eyes open and your wits about you as you plunge deeper into the mire.) Unless otherwise indicated, a number without a subscript or a prefix character is generally assumed to represent a decimal value. Sometime in the late 94s, the American chemist turned topologist turned statistician John Wilder Tukey realized that computers and the binary number system were destined to become increasingly important. In addition to coining the word software, Tukey decided that saying binary digit was a bit of a mouthful, so he started to look for an alternative. He considered a variety of options, including binit and bigit, but eventually settled on bit, which is elegant in its simplicity and is used to this day. Binary values of 2 and 2 are said to be four and eight bits wide, respectively. Groupings of four bits are relatively common, so they are given the special name of nybble (or sometimes nibble). Similarly, groupings of eight bits are also common, so they are given the special name of byte. Thus, two nybbles make a byte, which goes to show that computer engineers do have a sense of humor (albeit not a tremendously sophisticated one). Counting in binary Counting in binary is even easier than counting in decimal; it just seems a little harder if you aren t familiar with it. As usual, we start counting from, and then we increment the first column to be, at which point we ve run out of all the available digits. Thus, on the next count we reset the first column to, increment the second column to, and proceed on our merry way (Figure -5). Similarly, once we ve reached 2, the next count will set the first column to and attempt to increment the second column. But the second column already contains a, so this will also be set to and we ll increment the third column, resulting in 2. (Note that Figure -5 doesn t require us to use subscripts or special prefix symbols to indicate the binary values, because in this case they are obvious from the context.)

8 4 INTRODUCING BINARY AND HEXADECIMAL NUMBERS Binary Decimal Figure -5. Counting in binary. Learning your binary times tables Cast your mind back through the mists of time to those far-off days in elementary (junior) school. You probably remember learning your multiplication tables by rote, starting with the two times table ( one two is two, two twos are four, three twos are six, ) and wending your weary way onward and upward to the twelve times table ( ten twelves are one hundred and twenty, eleven twelves are one hundred and thirtytwo, and wait for it, wait for it twelve twelves are one hundred and forty-four ). Phew! The bad news is that we need to perform a similar exercise for binary the good news is that, as illustrated in Figure -6, we can do the whole thing in about five seconds flat! That s all there is to it. This is the only binary multiplication table there is. This really is pretty much as complex as it gets! Multiplication x x x x Figure -6. The binary multiplication table.

9 USING WIRES TO REPRESENT NUMBERS 5 Using Wires to Represent Numbers Today s digital electronic computers are formed from large numbers of microscopic semiconductor switches called transistors, which can be turned on and off incredibly quickly (thousands of millions of times a second). Note Computers can be constructed using a variety of engineering disciplines, resulting in such beasts as electronic, hydraulic, pneumatic, and mechanical systems that process data using analog or digital techniques. For the purposes of this book however, we will consider only digital electronic implementations, because these account for the overwhelming majority of modern computer systems. Transistors can be connected together to form a variety of primitive logical elements called logic gates. In turn, large numbers of logic gates can be connected together to form a computer. It s relatively easy for electronics engineers to create logic gates that can detect, process, and generate two distinct voltage levels. 2 For example, logic gates circa 975 tended to use voltage levels of volts and 5 volts. However, the actual voltage values used inside any particular computer are of interest only to the electronics engineers themselves. All we need know is that these two levels can be used to represent binary and, respectively. In the counting in binary example illustrated in Figure -5, there was an implication that our table could have continued forever. This is because numbers written with pencil and paper can be of any size, limited only by the length of your paper and your endurance. By comparison, the numbers inside a computer have to be mapped onto a physical system of logic gates and wires. For example, a single wire can be used to represent only 2 2 binary values ( and ), two wires can be used to represent different binary values (,,, and ), three wires can be used to represent differ- Transistors and logic gates are introduced in greater detail in the book Bebop to the Boolean Boogie (An Unconventional Guide to Electronics), 2nd edition, by Clive Max Maxfield ISBN Voltage refers to electrical potential, which is measured in volts. For example, a 9-volt battery has more electrical potential than a 3-volt battery. Once again, the concept of voltage is introduced in greater detail in Bebop to the Boolean Boogie (An Unconventional Guide to Electronics).

10 6 INTRODUCING BINARY AND HEXADECIMAL NUMBERS ent binary values ( 2, 2, 2, 2, 2, 2, 2, and 2 ), and so on. The term bus is used to refer to a group of signals that carry similar information and perform a common function. In a computer, a bus called the data bus is, not surprisingly, used to convey data. Note In this context, the term data refers to numerical, logical, or other information presented in a form suitable for processing by a computer.for the purposes of this book however, we will consider only digital electronic implementations, because these account for the overwhelming majority of modern computer systems. Actually, data is the plural of the Latin datum, meaning something given. The plural usage is still common, especially among scientists, so it s not unusual to see expressions like These data are However, it is becoming increasingly common to use data to refer to a singular group entity such as information. Thus, an expression like This data is would also be acceptable to a modern audience. For the purposes of these discussions, let s assume that we have a data bus comprising eight wires that we wish to use to convey binary data. In this case, we can use these wires to represent different combinations of s and s. If we wished to use these different binary patterns to represent numbers, then we might decide to represent decimal values in the range to 255 (Figure -7). For reasons that will be discussed in greater detail in Chapter 4, this form of representation is referred to as unsigned binary numbers. In any numbering system, it is usual to write the most-significant digit on the left and the least-significant digit on the right. For example, when you see a decimal number such as 825, you immediately assume that the 8 on the left is the most-significant digit (representing eight hundred), whereas the 5 on the right is the least-significant digit (representing only five). Similarly, the most-significant binary digit, referred to as the most-significant bit (MSB), is on the left-hand side of the binary number, whereas the least-significant bit (LSB) is on the right. The Hexadecimal Number System The problem with binary values is that, although we humans are generally good at making sense out of symbolic representations like words and numbers, we find it difficult to comprehend the meaning behind long strings of s and s. For example, the binary value 2 doesn t im-

11 THE HEXADECIMAL NUMBER SYSTEM s column (MSB) 64s column 32s column 6s column 8s column 4s column 2s column s column (LSB) () () (2) (3) (4) (253) (254) (255) Eight wires Figure -7. Using eight wires to represent unsigned binary numbers (values in parentheses are decimal equivalents). mediately register with most of us, whereas its decimal equivalent of 26 is much easier to understand. Unfortunately (as we shall come to see), translating values between binary and decimal can be a little awkward. However, any number system with a base that is a power of two (for example, 4, 8, 6, 32, etc.) can be easily mapped into its binary equivalent, and vice versa. In the early days of computing, it was common for computers to have data busses whose widths were wholly divisible by three (9 bits, 2 bits, 8 bits, and so forth). Thus, the octal (base-8) number system became very popular, because each octal digit can be directly mapped onto three binary digits (bits). More recently, computers have standardized on bus widths that are wholly divisible by eight (8 bits, 6 bits, 32 bits, and so forth). For this reason, the use of octal has declined and the hexadecimal (base-6) number system is now prevalent, because each hexadecimal digit can be directly mapped onto four bits. As a base-6 system, hexadecimal requires 6 unique symbols, but inventing completely new symbols would not be a particularly efficacious solution, not the least that we would all have to learn them! Even worse, it would be completely impractical to modify every typewriter and com-

13 THE HEXADECIMAL NUMBER SYSTEM 9 Decimal Binary Hexadecimal Value zero one two three four five six seven eight nine ten eleven twelve thirteen fourteen fifteen sixteen seventeen eighteen A B C D E F.. Figure -9. Counting in hexadecimal. Four thousand and ninty -sixes column Two hundred and fifty -sixes column Sixteens column Ones column 6,384 3,84 2,234 Hexadecimal number Decimal equivalent 4 (4 x 6 3 ) (F x 6 2 ) ( x 6 ) (A x 6 ) (4 x 4,96) (F x 256 ) ( x 6) (A x ) FA 6 Figure -. Combining digits and column weights in hexadecimal.

15 REVIEW 2 4) What are two different ways to indicate that the value is a binary number? 5) What are two different ways to indicate that the value is a hexadecimal number? 6) Convert the decimal value 25 into an 8-bit unsigned binary equivalent. 7) Convert the binary value 2 into its hexadecimal equivalent. 8) Convert the hexadecimal value \$E6 into its binary equivalent. 9) How many digits would there be in a quinary (base-5) place-value number system (list these digits); what would be the first five column weights in such a system; and how would one count in such a system? ) Assuming positive numbers starting at, what range of decimal numbers could be represented using the different binary patterns that could be accommodated by a set of seven wires? How about nine wires? Bonus Question Cast your mind back to our discussions on counting with wires and Figure -7. There are two key problems associated with this form of binary representation. Can you spot what they are? Answer The first problem is that eight wires allow us to represent only 256 different combinations of s and s. For the purposes of these discussions, we decided to use these binary patterns to represent the decimal values to 255, but this is obviously very restrictive. What happens if we wish to represent values greater than 255? The second problem is that the scheme we demonstrated here allows us to represent only positive values. What happens if we wish to represent both positive and negative values? Both of these issues are addressed in Chapter 4. However, it would be useful for you to start thinking about them now and see if you can come up with your own solutions. Later, when we reach Chapter 4, you can compare your ideas with the techniques that have been developed by computer scientists and see how well you did.

### Lecture 1: Digital Systems and Number Systems

Lecture 1: Digital Systems and Number Systems Matthew Shuman April 3rd, 2013 The Digital Abstraction 1.3 in Text Analog Systems Analog systems are continuous. Look at the analog clock in figure 1. The

### Section 1.4 Place Value Systems of Numeration in Other Bases

Section.4 Place Value Systems of Numeration in Other Bases Other Bases The Hindu-Arabic system that is used in most of the world today is a positional value system with a base of ten. The simplest reason

### Lecture 1: Digital Systems and Binary Numbers

Lecture 1: Digital Systems and Binary Numbers Matthew Shuman September 30th, 2009 1 Digital Systems 1-1 in Text 1.1 Analog Systems Analog systems are continuous. Look at the analog clock in figure 1. The

### CHAPTER TWO. 2.1 Unsigned Binary Counting. Numbering Systems

CHAPTER TWO Numbering Systems Chapter one discussed how computers remember numbers using transistors, tiny devices that act like switches with only two positions, on or off. A single transistor, therefore,

### NUMBERING SYSTEMS C HAPTER 1.0 INTRODUCTION 1.1 A REVIEW OF THE DECIMAL SYSTEM 1.2 BINARY NUMBERING SYSTEM

12 Digital Principles Switching Theory C HAPTER 1 NUMBERING SYSTEMS 1.0 INTRODUCTION Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk,

### P A R T DIGITAL TECHNOLOGY

P A R T A DIGITAL TECHNOLOGY 1 CHAPTER NUMBERING SYSTEMS 1.0 INTRODUCTION This chapter discusses several important concepts including the binary, octal and hexadecimal numbering systems, binary data organization

### Binary Numbers. Bob Brown Information Technology Department Southern Polytechnic State University

Binary Numbers Bob Brown Information Technology Department Southern Polytechnic State University Positional Number Systems The idea of number is a mathematical abstraction. To use numbers, we must represent

### CHAPTER 3 Number System and Codes

CHAPTER 3 Number System and Codes 3.1 Introduction On hearing the word number, we immediately think of familiar decimal number system with its 10 digits; 0,1, 2,3,4,5,6, 7, 8 and 9. these numbers are called

### 6 The Hindu-Arabic System (800 BC)

6 The Hindu-Arabic System (800 BC) Today the most universally used system of numeration is the Hindu-Arabic system, also known as the decimal system or base ten system. The system was named for the Indian

### MATH 2420 Discrete Mathematics Lecture notes Numbering Systems

MATH 2420 Discrete Mathematics Lecture notes Numbering Systems Objectives: Introduction: 1. Represent a binary (hexadecimal, octal) number as a decimal number. 2. Represent a decimal (hexadecimal, octal)

### Number Representation and Arithmetic in Various Numeral Systems

1 Number Representation and Arithmetic in Various Numeral Systems Computer Organization and Assembly Language Programming 203.8002 Adapted by Yousef Shajrawi, licensed by Huong Nguyen under the Creative

### Decimal and Binary Numbers By Dwight Watt, EdD Copyright 2000, 2014

Copyright 2000, 2014 As you work with the Internet and computers you will work with several number systems. Number systems give us a way to express numbers. There are an infinite number of number systems

### Chapter NUMBER SYSTEMS NUMBER SYSTEMS USED IN CIS. Learning Objectives for Chapter 1:

CIS 104 PAGE 1 NUMBER SYSTEMS Learning Objectives for Chapter 1: 1. To learn how to represent numbers in computer. 2. To learn how computer performs arithmetic operations. Chapter 1 NUMBER SYSTEMS USED

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

Digital System Design Prof. D. Roychoudhury Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 03 Digital Logic - I Today, we will start discussing on Digital

### Chapter 2: Number Systems

Chapter 2: Number Systems Logic circuits are used to generate and transmit 1s and 0s to compute and convey information. This two-valued number system is called binary. As presented earlier, there are many

### Binary Representation and Computer Arithmetic

Binary Representation and Computer Arithmetic The decimal system of counting and keeping track of items was first created by Hindu mathematicians in India in A.D. 4. Since it involved the use of fingers

### Tutorial C1. Conversion Between Number Bases. Objectives: Reading: Background: Binary Numbers

utorial C Conversion Between Number Bases Objectives: Reading: After this tutorial you should be able to convert decimal numbers to binary numbers (both unsigned and 2 s complement), and vice versa. You

### Digital Electronics. 1.0 Introduction to Number Systems. Module

Module 1 www.learnabout-electronics.org Digital Electronics 1.0 Introduction to What you ll learn in Module 1 Section 1.0. Recognise different number systems and their uses. Section 1.1 in Electronics.

### Arithmetic Circuits Addition, Subtraction, & Multiplication

Arithmetic Circuits Addition, Subtraction, & Multiplication The adder is another classic design example which we are obliged look at. Simple decimal arithmetic is something which we rarely give a second

### Sessions 1, 2 and 3 Number Systems

COMP 1113 Sessions 1, 2 and 3 Number Systems The goal of these three class sessions is to examine ways in which numerical and text information can be both stored in computer memory and how numerical information

### 13. NUMBERS AND DATA 13.1 INTRODUCTION

13. NUMBERS AND DATA 13.1 INTRODUCTION Base 10 (decimal) numbers developed naturally because the original developers (probably) had ten fingers, or 10 digits. Now consider logical systems that only have

### Number Systems. Before the inception of digital computers, the only number system

Number Systems Introduction & Objectives: 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

### 6 3 4 9 = 6 10 + 3 10 + 4 10 + 9 10

Lesson The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base- system. When you

### Number Systems. In primary school, we would have learned the place values like this: Digit Contributed value = 8000

Number Systems The Decimal (Denary) System A good understanding of other number systems depends on a good understanding of the decimal system that you have used for counting and arithmetic since you started

### Number Systems (2.1.1)

Computer Studies 0 Syllabus Number Systems (..) Representation of numbers in binary. Conversion between decimal and binary, and between binary and hexadecimal. Use of subscripts, 0 and 6 for bases. The

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

Data Representation Section 3.1 Data Types Registers contain either data or control information Control information is a bit or group of bits used to specify the sequence of command signals needed for

### CPE 323 Data Types and Number Representations

CPE 323 Data Types and Number Representations Aleksandar Milenkovic Numeral Systems: Decimal, binary, hexadecimal, and octal We ordinarily represent numbers using decimal numeral system that has 10 as

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

plc numbers - 3. Topics: Number bases; binary, octal, decimal, hexadecimal Binary calculations; s compliments, addition, subtraction and Boolean operations Encoded values; BCD and ASCII Error detection;

### الدكتور المھندس عادل مانع داخل

الدكتور المھندس عادل مانع داخل / میسان جامعة / كلیة الھندسة قسم الھندسة الكھرباي یة Chapter 1: Digital Systems Discrete Data Examples: 26 letters of the alphabet (A, B etc) 10 decimal digits (0, 1, 2 etc)

### By the end of the lecture, you should be able to:

Extra Lecture: Number Systems Objectives - To understand: Base of number systems: decimal, binary, octal and hexadecimal Textual information stored as ASCII Binary addition/subtraction, multiplication

### 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.

Digital Logic 1 Data Representations 1.1 The Binary System 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. The system we

### Introduction ToNumber Systems

Introduction ToNumber Systems Collected by: Zainab Alkadhem Page 1 of 25 Digital systems have such a prominent role in everyday life that we refer to the present technological period as the digital age.

### LAMC Beginners Circle October 13, Oleg Gleizer. Warm-up. The following problem was communicated to me by one of our students, Arul Kolla.

LAMC Beginners Circle October 13, 2013 Oleg Gleizer oleg1140@gmail.com Warm-up The following problem was communicated to me by one of our students, Arul Kolla. Problem 1 Use four fours to make fifty. Note

### CSCC85 Spring 2006: Tutorial 0 Notes

CSCC85 Spring 2006: Tutorial 0 Notes Yani Ioannou January 11 th, 2006 There are 10 types of people in the world, those who understand binary, and those who don t. Contents 1 Number Representations 1 1.1

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

Everything you wanted to know about using Hexadecimal and Octal Numbers in Visual Basic 6 Number Systems No course on programming would be complete without a discussion of the Hexadecimal (Hex) number

### 1 Basic Computing Concepts (4) Data Representations

1 Basic Computing Concepts (4) Data Representations The Binary System 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. The

### Chapter 2 Numeric Representation.

Chapter 2 Numeric Representation. Most of the things we encounter in the world around us are analog; they don t just take on one of two values. How then can they be represented digitally? The key is that

### Number System. Some important number systems are as follows. Decimal number system Binary number system Octal number system Hexadecimal number system

Number System When we type some letters or words, the computer translates them in numbers as computers can understand only numbers. A computer can understand positional number system where there are only

### 2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

2 Number Systems 2.1 Foundations of Computer Science Cengage Learning 2.2 Objectives After studying this chapter, the student should be able to: Understand the concept of number systems. Distinguish between

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

Digital System Design Prof. D Roychoudhry Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 04 Digital Logic II May, I before starting the today s lecture

### 1- Introduction. Bit: The most basic unit of information in a digital computer (On/Off ; 0/1 state)

Objectives: Chapter 2 : Introduction 1- Introduction 2- Positional Numbering System 3- Decimal to binary conversion 4- Signed integer representation 5- Floating-point representation 1- Introduction Bit:

### NUMBER SYSTEMS. 1.1 Introduction

NUMBER SYSTEMS 1.1 Introduction There are several number systems which we normally use, such as decimal, binary, octal, hexadecimal, etc. Amongst them we are most familiar with the decimal number system.

### Base Conversion written by Cathy Saxton

Base Conversion written by Cathy Saxton 1. Base 10 In base 10, the digits, from right to left, specify the 1 s, 10 s, 100 s, 1000 s, etc. These are powers of 10 (10 x ): 10 0 = 1, 10 1 = 10, 10 2 = 100,

### Numbering Systems. InThisAppendix...

G InThisAppendix... Introduction Binary Numbering System Hexadecimal Numbering System Octal Numbering System Binary Coded Decimal (BCD) Numbering System Real (Floating Point) Numbering System BCD/Binary/Decimal/Hex/Octal

### Discrete mathematics is the study of techniques, ideas and modes

CHAPTER 1 Discrete Systems Discrete mathematics is the study of techniques, ideas and modes of reasoning that are indispensable in applied disciplines such as computer science or information technology.

### (Refer Slide Time 6:09)

Digital Circuits and Systems Prof. S. Srinivasan Department of Electrical Engineering Indian Institute of Technology, Madras Lecture 3 Combinational Logic Basics We defined digital signal as a signal which

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

Conversions Dr. Sarita Agarwal (Acharya Narendra Dev College,University of Delhi) INTRODUCTION System- A number system defines a set of values to represent quantity. We talk about the number of people

### Collin's Lab: Binary & Hex

Collin's Lab: Binary & Hex Created by Collin Cunningham Last updated on 2014-08-21 01:30:12 PM EDT Guide Contents Guide Contents Video Transcript Learn More Comparison Converters Mobile Web Desktop 2 3

### Number Systems and. Data Representation

Number Systems and Data Representation 1 Lecture Outline Number Systems Binary, Octal, Hexadecimal Representation of characters using codes Representation of Numbers Integer, Floating Point, Binary Coded

### Number Systems and Data Representation CS221

Number Systems and Data Representation CS221 Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk, or as a state in a transistor, core,

### UNIT 2 : NUMBER SYSTEMS

UNIT 2 : NUMBER SYSTEMS page 2.0 Introduction 1 2.1 Decimal Numbers 2 2.2 The Binary System 3 2.3 The Hexadecimal System 5 2.4 Number Base Conversion 6 2.4.1 Decimal To Binary 6 2.4.2 Decimal to Hex 7

### Introduction Number Systems and Conversion

UNIT 1 Introduction Number Systems and Conversion Objectives 1. Introduction The first part of this unit introduces the material to be studied later. In addition to getting an overview of the material

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

APPENDIX D NUMBER SYSTEMS You will learn about the following in this appendix: The four important number systems in computing binary, octal, decimal, and hexadecimal. A number system converter program

### Chapter II Binary Data Representation

Chapter II Binary Data Representation The atomic unit of data in computer systems is the bit, which is actually an acronym that stands for BInary digit. It can hold only 2 values or states: 0 or 1, true

### Lecture 11: Number Systems

Lecture 11: Number Systems Numeric Data Fixed point Integers (12, 345, 20567 etc) Real fractions (23.45, 23., 0.145 etc.) Floating point such as 23. 45 e 12 Basically an exponent representation Any number

### Binary Which powers of 2 are we adding? Decimal answer 10101

1 CS 105 Lab #1 representation of numbers numbers are the dough we use to represent all information inside the computer. The purpose of this lab is to practice with some binary number representations.

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

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

### MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

CHAPTER01 QUESTIONS MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question. 1) Convert binary 010101 to octal. 1) A) 258 B) 58 C) 218 D) 158 2) Any number

### Chapter 10. Number Systems and Arithmetic Operations

232 Chapter 10 Number Systems and Arithmetic Operations 10.1 The Decimal Number System: The Decimal number system is a number system of base or radix equal to 10, which means that there are 10, called

### MT1 Number Systems. In general, the number a 3 a 2 a 1 a 0 in a base b number system represents the following number:

MT1 Number Systems MT1.1 Introduction A number system is a well defined structured way of representing or expressing numbers as a combination of the elements of a finite set of mathematical symbols (i.e.,

### Number System Decimal, Binary, OtlH Octal, Hex Conversion (one to another)

Number system Number System Outline Decimal, Binary, OtlH Octal, Hex Conversion (one to another) Decimal to Binary, Octal, Hex & Vice Versa Binary to HEX & vice versa Other representation Signed, Unsigned,

### Unit 2: Number Systems, Codes and Logic Functions

Unit 2: Number Systems, Codes and Logic Functions Introduction A digital computer manipulates discrete elements of data and that these elements are represented in the binary forms. Operands used for calculations

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

EE 261 Introduction to Logic Circuits Module #2 Number Systems Topics A. Number System Formation B. Base Conversions C. Binary Arithmetic D. Signed Numbers E. Signed Arithmetic F. Binary Codes Textbook

### CHAPTER TWO. 2.1 Unsigned Binary Counting. Numbering Systems

CHAPTER TWO Numbering Systems Chapter one discussed how computers remember numbers using transistors, tiny devices that act like switches with only two positions, on or off. A single transistor, therefore,

### CHAPTER 1 BINARY SYSTEM

STUDENT COPY DIGITAL & MICROPROCESSORS 3 CHAPTER 1 BINARY SYSTEM Base Conversion: A number a n, a n 1 a 2, a 1 a 0 a 1 a 2 a 3 expressed in a base r system has coefficient multiplied by powers of r. n

### Accuplacer Elementary Algebra Study Guide for Screen Readers

Accuplacer Elementary Algebra Study Guide for Screen Readers The following sample questions are similar to the format and content of questions on the Accuplacer Elementary Algebra test. Reviewing these

### Introduction to Digital Electronics

Digital Electronics - Learning Unit 1 Objective and Overview Introduction to Digital Electronics You ll be introduced to specialized terms and concepts and review basic instrumentation and construction

### Accuplacer Arithmetic Study Guide

Accuplacer Arithmetic Study Guide Section One: Terms Numerator: The number on top of a fraction which tells how many parts you have. Denominator: The number on the bottom of a fraction which tells how

### Here 4 is the least significant digit (LSD) and 2 is the most significant digit (MSD).

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

### Binary Numbers. X. Zhang Fordham Univ.

Binary Numbers X. Zhang Fordham Univ. 1 Numeral System! A way for expressing numbers, using symbols in a consistent manner.!! "11" can be interpreted differently:!! in the binary symbol: three!! in the

### OCTAL, BINARY, AND HEXADECIMAL NUMBERS

A: REVIEW - DECIMAL OR BASE 10 NUMBERS OCTAL, BINARY, AND HEXADECIMAL NUMBERS When we see a number like 2,578 we know the 2 counts for more than the 7, even though 7 is a larger number than 2. The reason

### 3. BINARY NUMBERS AND ARITHMETIC

3. BINARY NUMBERS AND ARITHMETIC 3.1. Binary Numbers The only place in a computer where you will find the number 9 is on the keyboard. Inside the computer you will only find 0 s and 1 s. All computer memory

### Numbers represented using groups of bits (1s and 0s) are said to be BINARY NUMBERS. Binary numbers are said to be in base 2.

DATA REPRESENTATION All data used by computers is in code form, based on the two digits 0 and 1. This is so, in order to reflect the two-state components of which these digital systems are made. Numbers

### Section 4.1 Rules of Exponents

Section 4.1 Rules of Exponents THE MEANING OF THE EXPONENT The exponent is an abbreviation for repeated multiplication. The repeated number is called a factor. x n means n factors of x. The exponent tells

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

UNIT 22: PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1 This work covers part of outcome 2 of the Edexcel standard module. The material is

### Elementary Algebra. Section 0.4 Factors

Section 0.4 Contents: Definitions: Multiplication Primes and Composites Rules of Composite Prime Factorization Answers Focus Exercises THE MULTIPLICATION TABLE x 1 2 3 4 5 6 7 8 9 10 11 12 1 1 2 3 4 5

### Unit 2 Number and Operations in Base Ten: Place Value, Addition, and Subtraction

Unit 2 Number and Operations in Base Ten: Place Value, Addition, and Subtraction Introduction In this unit, students will review place value to 1,000,000 and understand the relative sizes of numbers in

### 2.1 Binary Numbers. 2.3 Number System Conversion. From Binary to Decimal. From Decimal to Binary. Section 2 Binary Number System Page 1 of 8

Section Binary Number System Page 1 of 8.1 Binary Numbers The number system we use is a positional number system meaning that the position of each digit has an associated weight. The value of a given number

### Number Systems Richard E. Haskell

NUMBER SYSTEMS D Number Systems Richard E. Haskell Data inside a computer are represented by binary digits or bits. The logical values of these binary digits are denoted by and, while the corresponding

### NUMBER REPRESENTATIONS IN THE COMPUTER for COSC 120

NUMBER REPRESENTATIONS IN THE COMPUTER for COSC 120 First, a reminder of how we represent base ten numbers. Base ten uses ten (decimal) digits: 0, 1, 2,3, 4, 5, 6, 7, 8, 9. In base ten, 10 means ten. Numbers

### Digital Number Representation

Review Questions: Digital Number Representation 1. What is the significance of the use of the word digit to represent a numerical quantity? 2. Which radices are natural (i.e., they correspond to some aspect

### CHAPTER 3 Numbers and Numeral Systems

CHAPTER 3 Numbers and Numeral Systems Numbers play an important role in almost all areas of mathematics, not least in calculus. Virtually all calculus books contain a thorough description of the natural,

### Lecture 2 - POGIL Activity

15213 - Lecture 2 - POGIL Activity Introduction In this activity you will learn about binary numbers. This activity was based on material developed by Professor Saturnino Garcia of the University of San

### a b Grade 6 Math Circles Fall 2010 Exponents and Binary Numbers Powers What is the product of three 2s? =

1 University of Waterloo Faculty of Mathematics Centre for Education in Mathematics and Computing Powers What is the product of three 2s? 2 2 2 = What is the product of five 2s? 2 2 2 2 2 = Grade 6 Math

### Integer Numbers. The Number Bases of Integers Textbook Chapter 3

Integer Numbers The Number Bases of Integers Textbook Chapter 3 Number Systems Unary, or marks: /////// = 7 /////// + ////// = ///////////// Grouping lead to Roman Numerals: VII + V = VVII = XII Better:

### As we have discussed, digital circuits use binary signals but are required to handle

Chapter 2 CODES AND THEIR CONVERSIONS 2.1 INTRODUCTION As we have discussed, digital circuits use binary signals but are required to handle data which may be alphabetic, numeric, or special characters.

### Lecture 8 Binary Numbers & Logic Operations The focus of the last lecture was on the microprocessor

Lecture 8 Binary Numbers & Logic Operations The focus of the last lecture was on the microprocessor During that lecture we learnt about the function of the central component of a computer, the microprocessor

### School of Informatics, University of Edinburgh

CS1Ah Lecture Note 5 Java Expressions Many Java statements can contain expressions, which are program phrases that tell how to compute a data value. Expressions can involve arithmetic calculation and method

### CHAPTER THREE. 3.1 Binary Addition. Binary Math and Signed Representations

CHAPTER THREE Binary Math and Signed Representations Representing numbers with bits is one thing. Doing something with them is an entirely different matter. This chapter discusses some of the basic mathematical

### Binary. There are 10 types of people in the world those that understand binary and those that don t.

Binary There are 10 types of people in the world those that understand binary and those that don t. What is binary? You and I write numbers like this: twelve is 12, sixty eight is 68, and one hundred is

### = Chapter 1. The Binary Number System. 1.1 Why Binary?

Chapter The Binary Number System. Why Binary? The number system that you are familiar with, that you use every day, is the decimal number system, also commonly referred to as the base-0 system. When you

### 2. Number Systems - Positional Number Systems (1) - 2. Number Systems - Binary Numbers - 2. Number Systems - Positional Number Systems (2) -

Sistemas Digitais I LESI - 2º ano Lesson 2 - Number Systems Prof. João Miguel Fernandes (miguel@di.uminho.pt) Dept. Informática - Positional Number Systems (1) - We use daily a positional number system.

### The Subnet Training Guide

The Subnet Training Guide A Step By Step Guide on Understanding and Solving Subnetting Problems by Brendan Choi v25 easysubnetcom The Subnet Training Guide v25 easysubnetcom Chapter 1 Understanding IP

### Place Value. Key Skills. Complete the daily exercises to focus on improving this skill.

Day 1 1 Write Four Million, Four Hundred and Twelve Thousand, Eight Hundred and Seventy One in digits 2 Write 6330148 in words 3 Write 12630 in words 4 Write 71643 in words 5 Write 28009 in words 6 Write