Number systems Fall, 2007

Size: px
Start display at page:

Download "Number systems Fall, 2007"

Transcription

1 Number Systems What does 1234 mean? Before taking one step into computing, you need to understand the simplest mathematical idea, number systems. You will need to be comfortable with both binary (base 2) and hexadecimal (base 16) numbers. The former are essential to the internal working of the computer; the latter are encountered in much web work and graphics, and turn out to be a convenient way to package large binary numbers. Think of numbers in two ways. A number has an innate value, its ordinality, and it also has an expression such as The ordinal value of a number is something real, in the sense that 1234 is 1 more than 1233 and 1 less that 1235 and it can be mapped to a pile of pebbles or a herd of sheep of the same size. Think of the pile of pebbles. No matter how we choose to write the number 1234, or what kinds of things we are counting, it is equivalent to a pile of 1234 pebbles. The expression 1234, however, is not a fundamental property of a number since it depends upon which base we are using. Number systems are usually built on using the idea of "place", i.e. in decimal, for the number 6305: Place Digits Column Values In Decimal Sum Digits x Values Each digit is in a column so the digit tells you how many units of that column you have. In this case, we have 6 thousands, 3 hundreds, 0 tens, and 5 ones. The third row shows the values of the columns written as powers of the base, 10. If we had the same digits but in base 8, the implicit columns would be: Place Digits Column Values In Decimal Sum Digits x Values (in decimal) Notice that we are being a bit sneaky here. The 8, 64, 512 are written in decimal just so we have a real sense of them. Those values in base 8 would be 10, 100, The allowed digits in base 1

2 8 are 0, 1, 2, 3, 4, 5, 6, 7, that is, when you count in base 8, the count rolls over to 10 after 7. This shows that = If the base were sixteen, the number would be: Place Digits Column Values In Decimal Sum Digits x Values (in decimal) Again, the columns in hexadecimal would be the 1, 10, 100, 1000 columns if they were in base 16. The value of 6305 in base 16 would equal in base 10, or, more compactly as = The number 6305 would not be allowed in bases 2, 3, 4, 5, or 6 because no "6" digit is allowed in any of those bases. Moving between number systems Let's consider changing a number from base 10, decimal, to some other base, say 5. There are two ways to go from base 10 to base 5. For example, to convert 613 to base 5: Examine the base 10 number and starting from the highest power of 5, see what powers of 5 are in the number 613. The powers of 5 are 1, 5, 25, 125, 625 (5^0, 5^1, 5^2, 5^3, 5^4). 625 is too big, so check 125 and see that it will go 4 times, leaving a remainder of = 113. Next, 25 divides 113 just 4 times leaving 13. Finally, 5 goes into 13 twice and leaves 3, so the digits are, from the left: (125) (25) (5) (1) = = 613 So, in base 5, the decimal number 613 would be expressed as Another approach is to work from the least significant digit to the most significant (that is, working from right to left). To use this method, divide the decimal number by the base (5) to repeatedly find a quotient and remainder: number operation quotient remainder

3 As you see, the digits are extracted in reverse order, from right to left. If you think about this method, it suggests how number systems were invented in the first place. Suppose that in the distant past, you were lucky enough to own a large herd of sheep, say 613 (base 10) for our example. You might decide to count them by sorting them into groups based on the number of digits on one hand (5). So, you divide the sheep into groups of 5 and find you have 3 left over. There are a lot of 5-groups (122, to be precise), so you gather them into groups of five 5-groups and resulting in groups with 2 5-groups left over. Well, that is still a lot of groups of 25 sheep, so you group them once more into larger groups with 5 groups of 25 in each. Finally you see that there are just 4 of these large groups ( 125-groups ) with 4 groups of 25 left over, so in base 5 you have 4423 sheep: = (125) (25) (5) (1) = If you have a sweet tooth, consider this alternative: Suppose you have a small business in which you produce and package mint candies to sell at the local supermarket. Your mints are extremely popular in town, so each week you package and deliver several large cartons of mints. This week as it happens, you have made a total of 613 mints to package -- that's base 10. You package them into 5-packs, shrink wrap those into packages containing 5 of these 5-packs, and then you make up boxes each containing 5 shrink wraps. Since you are starting with 613 candies, you obviously will have some "leftovers." We show this in Figure

4 Figure 1-1 Counting candies in base 5 So what does our final count actually yield? The totality of the mints that you have made this afternoon are pictured at the bottom (the 4 boxes) and the right side of the diagram, the leftovers. This total number is: 4 (125-mint boxes) + 4 (25-mint left-over shrink-wraps) + 2 (5-mint left-over packs) + 3 left-over mints. All-in-all there are mint candies; that is, candies in all. The real temptation that must be avoided is to just eat up all those left-overs!! 4

5 To be certain the idea is clear, convert to base 3. Figure 1-2 shows how we can think about this using 32 toothpicks grouped along the top of the figure. Group them in 3 and notice 2 left over Combine the sets of 3 in groups of 3 (9) with 1 left over Combine the sets of 9 into groups of 3 (27) with 0 left over And finally collect groups of 3 units of 27. There are 0 groups of 81, just that 1 group of 27 left over Left over So, = The operations were quotient remainder 32 \ 3 = mod 3 = 2 10 \ 3 = 3 10 mod 3 = 1 3 \ 3 = 1 3 mod 3 = 0 1 \ 3 = 0 1 mod 3 = 1 Figure Conversion from base 10 to base 5 using 32 toothpicks 5

6 Bits, Bytes and Nibbles Binary The binary number system, base 2, is just the most extreme case with only two digits, 0 and 1. so that [128] [64] [32] [16] [8] [4] [2] [1] = = = = 255 Check out the Visual Basic program available on line an try counting in binary to watch the digits roll over. Adding binary numbers Here is a simple little exercise, to do the following additions in decimal: Now, write the answers in binary: Try these additions in decimal: Now, write the answers in binary: At this point, you know everything you need to know to add two long binary numbers like:

7 The process is quite simple. If the two digits in a column are 0 and 0, the sum is 0 in the column; If the digits are 0 and 1, the answer is 1 in the column. What happens if two digits are the column are 1? At this point, we place a 0 in the answer but we also have a 1 to carry over to the next column! That means that there are actually three numbers to add in the next column, the two digits already there and the carry digit. Here is an example: Carry 1 Carry 1 Carry 0 In decimal, the first number is 11, the second is 9, the sum is 20 or in binary Systematically do the addition for the two longer numbers above. Check your answer by converting the two numbers to decimal, adding them, and converting the answer back to binary. Bytes and character codes Binary numbers are typically used by computers and not by humans. The size of the binary numbers that get used are determined by hardware considerations, i.e. how many digits are there in each word, or memory element, in a computer. That s a design question. In early computers, word size would be determined by cost and the market the machine was designed for. Some computers designed primarily for business use might have 32-bit words; others aimed at the scientific and engineering market might contain 40 or 60-bit words. IBM made a decision in the mid-1960s that reshaped the design of memory. The company decided to build all of its machines around an 8-bit standard with this 8-bit element called a byte. For business calculations, 4 bytes (32 bits) could be treated as a unit or for scientific purposes one might use 8 bytes in a unit (64 bits). The byte had the further advantage that it was big enough to hold a single character code. A character code is simply this: if we have an electronic device that can store bits, 0 or 1, the only way to store a character is to assign a code to each character and store the code. For example the ASCII (or American Standard Code for Information Interchange) code for the letter A is 65 or in 8-bit binary. The character code for a is 97 or These codes were not invented for computers but for teletype machines that replaced the telegraph for message transmission. Now here s a problem. With 8-bits in a byte, there are only 256 possible codes, from to This works if the only language you care about is English, with maybe some European letters with accents, but what about the rest of the world? The answer was to move to a 16-bit, or 2-byte, code called Unicode to store the world s alphabets in. 16-bits allows up to 65,536 characters. Another advantage of moving to the byte notation is just that it makes it easier to look at binary numbers if they are divided into groups of 8, like: rather than

8 Unary PS: there is actual one simpler number system, unary, that goes like this: 1 = 1 2 = 11 3 = = 1111 This gets old fast and we will not pursue it. Hexadecimal In a sense, hexadecimal is the other extreme we will find useful. In hexadecimal, the base is 16, so the digits are oops, we have run out of characters Well, hexadecimal first came into popular use among computer programmers in the days when the choice of characters that a computer could generate was extremely limited, i.e. the decimal digits, a few punctuation marks, and uppercase roman letters. So the characters chosen to represent [10] [11] [12] [13] [14] [15] were the letters A B C D E F, respectively, and our digits now are A B C D E F Please note that the letters A, B, C, D, E, F here are digits, not letters of the alphabet. Some calculations that we'd be interested in: [ ] [ ] [ ] [65536] [4096] [256] [16] [1] Who would want to use numbers in base 16? Anyone, like a programmer, who needs to examine a computer s memory to find out, for example, why a computer program crashed. To examine the memory (in the old days) meant to print out the contents of the computer s memory. As you might imagine, printing the memory in binary would entail a vast amount of paper and be almost impossible for anyone to grasp. On the other hand, if the memory were printed in hexadecimal, it might just be possible to understand what one is seeing. Why base 16 and not base 10. The answer is that there is an easy correspondence between binary and hexadecimal numbers. Look at what happens as one counts in binary from 0 to 15 (table below) and then goes one number further. The sequence of binary numbers 0000 to 1111 equals the hexadecimal digits 0 to F. When the binary number 1111 rolls over to 10000, the hexadecimal number F rolls over to 10. 8

9 binary hexadecimal decimal A B C D E F Figure comparison of small binary, hexadecimal, and decimal numbers. Shading at the bottom of the table shows where additional characters are required. To go from binary to hexadecimal, you can use the fact that 4 binary digits, 4 bits, can be converted immediately to hexadecimal, e.g., B D F 7 3 (Note that we begin the grouping into 4-bits from the right side of the binary number) and viceversa 4 A 3 F (note: no initial "0" needed here) 9

10 The utility of being able to read base 16 is that many computer parameters are given in hexadecimal and you need to be comfortable with it. It is often used to describe color intensities in computer graphics and that is directly related to how computer memory is arranged. Early computers differed greatly in how memory was partitioned. Memory was described in terms of words of a certain number of bits with each word having its own address in memory. The most powerful computers for scientific calculation might use 60-bit words, a more general purpose computer could have 36-bit words, and smaller minicomputers could have words of 8 or 12 bits. IBM, with its introduction of the big System 360 computers in the late 1960 s moved to a different model where memory was described in bytes, or 8-bit units, that could be used in 32- or 64-bit words. That turned out to be a useful unit, as early microprocessors were typically based on 8-bit words also. Gradually, everyone moved to describing computer storage in units of bytes and even the most inexperienced PC user feels at ease describing their computer as having 256 Megabytes (MB) of memory and 40 Gigabytes (GB) of disk storage (one KB (kilobyte) is 1024 bytes, one MB is 1024 kilobytes, one GB is 1024 MB). So, to review, let s look at the byte or 8-bit number. 2^7 2^6 2^5 2^4 2^3 2^2 2^1 2^0 [128] [64] [32] [16] [8] [4] [2] [1] A one byte number can have values from to _ _ In decimal and hexadecimal those values are = 0 10 = to = = FF 16. Now, remember: there are 10 kinds of people in this world. Those who know binary, and those who don t. The Keyboard One last look at the funny little dichotomy involved in dealing with a computer. By now you know that everything is stored in a computer as numbers. Interestingly enough all of our communication with the computer through the keyboard is by way of characters. Well, sort of. Here is what happens. If you type the number 73 in responses to a question from the computer, what you are typing are the two characters 7 and 3, possibly followed by a third character, a return (Enter) character. When you press a key, say for the character 7, the keyboard sends a binary code, called a scan code, to the computer and signals an interrupt. The computer accepts the scan code and uses it to look in a table to find the American Standard Code for Information Interchange (ASCII) code for the character 7. This turns out to be a binary number (or or ). To convert 10

11 this into the number 7, a computer program that is trying to read the number 7 has to subtract (= ) from the binary code (subtract from to get = 7 10 ). After the 7 has been read and stored as a binary number ( ), the second character (3) is read and converted to a number, the 7 is multiplied by 10 to shift it to the 10s column and the 3 is added to produce, finally, the number 73. Easy, no? Fortunately, the code necessary to read in a multi-digit number is built into most operating systems and programming languages and doesn t have to be reconstructed by every programmer. It should make clear to you, however, why computers are often very fussy about whether you have typed in a string of digits or a string of alphabetic characters. 11

The Hexadecimal Number System and Memory Addressing

The Hexadecimal Number System and Memory Addressing APPENDIX C The Hexadecimal Number System and Memory Addressing U nderstanding the number system and the coding system that computers use to store data and communicate with each other is fundamental to

More information

Counting in base 10, 2 and 16

Counting in base 10, 2 and 16 Counting in base 10, 2 and 16 1. Binary Numbers A super-important fact: (Nearly all) Computers store all information in the form of binary numbers. Numbers, characters, images, music files --- all of these

More information

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

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

More information

Base Conversion written by Cathy Saxton

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,

More information

The use of binary codes to represent characters

The use of binary codes to represent characters The use of binary codes to represent characters Teacher s Notes Lesson Plan x Length 60 mins Specification Link 2.1.4/hi Character Learning objective (a) Explain the use of binary codes to represent characters

More information

Computer Science 281 Binary and Hexadecimal Review

Computer Science 281 Binary and Hexadecimal Review Computer Science 281 Binary and Hexadecimal Review 1 The Binary Number System Computers store everything, both instructions and data, by using many, many transistors, each of which can be in one of two

More information

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

More information

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

More information

Section 1.4 Place Value Systems of Numeration in Other Bases

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

More information

Binary, Hexadecimal, Octal, and BCD Numbers

Binary, Hexadecimal, Octal, and BCD Numbers 23CH_PHCalter_TMSETE_949118 23/2/2007 1:37 PM Page 1 Binary, Hexadecimal, Octal, and BCD Numbers OBJECTIVES When you have completed this chapter, you should be able to: Convert between binary and decimal

More information

Encoding Text with a Small Alphabet

Encoding Text with a Small Alphabet Chapter 2 Encoding Text with a Small Alphabet Given the nature of the Internet, we can break the process of understanding how information is transmitted into two components. First, we have to figure out

More information

Chapter 4: Computer Codes

Chapter 4: Computer Codes Slide 1/30 Learning Objectives In this chapter you will learn about: Computer data Computer codes: representation of data in binary Most commonly used computer codes Collating sequence 36 Slide 2/30 Data

More information

Lecture 2. Binary and Hexadecimal Numbers

Lecture 2. Binary and Hexadecimal Numbers Lecture 2 Binary and Hexadecimal Numbers Purpose: Review binary and hexadecimal number representations Convert directly from one base to another base Review addition and subtraction in binary representations

More information

Memory is implemented as an array of electronic switches

Memory is implemented as an array of electronic switches Memory Structure Memory is implemented as an array of electronic switches Each switch can be in one of two states 0 or 1, on or off, true or false, purple or gold, sitting or standing BInary digits (bits)

More information

What Is Singapore Math?

What Is Singapore Math? What Is Singapore Math? You may be wondering what Singapore Math is all about, and with good reason. This is a totally new kind of math for you and your child. What you may not know is that Singapore has

More information

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8

Oct: 50 8 = 6 (r = 2) 6 8 = 0 (r = 6) Writing the remainders in reverse order we get: (50) 10 = (62) 8 ECE Department Summer LECTURE #5: Number Systems EEL : Digital Logic and Computer Systems Based on lecture notes by Dr. Eric M. Schwartz Decimal Number System: -Our standard number system is base, also

More information

Number Representation

Number Representation Number Representation CS10001: Programming & Data Structures Pallab Dasgupta Professor, Dept. of Computer Sc. & Engg., Indian Institute of Technology Kharagpur Topics to be Discussed How are numeric data

More information

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

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;

More information

ASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot

ASCII Code. Numerous codes were invented, including Émile Baudot's code (known as Baudot ASCII Code Data coding Morse code was the first code used for long-distance communication. Samuel F.B. Morse invented it in 1844. This code is made up of dots and dashes (a sort of binary code). It was

More information

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance What You Will Learn... Computers Are Your Future Chapter 6 Understand how computers represent data Understand the measurements used to describe data transfer rates and data storage capacity List the components

More information

Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems

Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems Chapter 7 Lab - Decimal, Binary, Octal, Hexadecimal Numbering Systems This assignment is designed to familiarize you with different numbering systems, specifically: binary, octal, hexadecimal (and decimal)

More information

STUDY GUIDE CHAPTER 1

STUDY GUIDE CHAPTER 1 STUDY GUIDE CHAPTER 1 True/False Indicate whether the statement is true or false. 1. Digital technology has made it easy to produce copies of music with no loss of quality from the original. 2. Free source

More information

Decimal Notations for Fractions Number and Operations Fractions /4.NF

Decimal Notations for Fractions Number and Operations Fractions /4.NF Decimal Notations for Fractions Number and Operations Fractions /4.NF Domain: Cluster: Standard: 4.NF Number and Operations Fractions Understand decimal notation for fractions, and compare decimal fractions.

More information

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer

Computers. Hardware. The Central Processing Unit (CPU) CMPT 125: Lecture 1: Understanding the Computer Computers CMPT 125: Lecture 1: Understanding the Computer Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University January 3, 2009 A computer performs 2 basic functions: 1.

More information

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal.

Binary Representation. Number Systems. Base 10, Base 2, Base 16. Positional Notation. Conversion of Any Base to Decimal. Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must be able to handle more than just values for real world problems

More information

Binary Representation

Binary Representation Binary Representation The basis of all digital data is binary representation. Binary - means two 1, 0 True, False Hot, Cold On, Off We must tbe able to handle more than just values for real world problems

More information

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

Digital codes. Resources and methods for learning about these subjects (list a few here, in preparation for your research): Digital codes This worksheet and all related files are licensed under the Creative Commons Attribution License, version 1.0. To view a copy of this license, visit http://creativecommons.org/licenses/by/1.0/,

More information

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory.

Machine Architecture and Number Systems. Major Computer Components. Schematic Diagram of a Computer. The CPU. The Bus. Main Memory. 1 Topics Machine Architecture and Number Systems Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting from Decimal to Binary Major Computer Components

More information

Cyber Security Workshop Encryption Reference Manual

Cyber Security Workshop Encryption Reference Manual Cyber Security Workshop Encryption Reference Manual May 2015 Basic Concepts in Encoding and Encryption Binary Encoding Examples Encryption Cipher Examples 1 P a g e Encoding Concepts Binary Encoding Basics

More information

Decimals and other fractions

Decimals and other fractions Chapter 2 Decimals and other fractions How to deal with the bits and pieces When drugs come from the manufacturer they are in doses to suit most adult patients. However, many of your patients will be very

More information

2011, The McGraw-Hill Companies, Inc. Chapter 3

2011, The McGraw-Hill Companies, Inc. Chapter 3 Chapter 3 3.1 Decimal System The radix or base of a number system determines the total number of different symbols or digits used by that system. The decimal system has a base of 10 with the digits 0 through

More information

Computer Logic (2.2.3)

Computer Logic (2.2.3) Computer Logic (2.2.3) Distinction between analogue and discrete processes and quantities. Conversion of analogue quantities to digital form. Using sampling techniques, use of 2-state electronic devices

More information

Cloud storage Megas, Gigas and Teras

Cloud storage Megas, Gigas and Teras Cloud storage Megas, Gigas and Teras I think that I need cloud storage. I have photos, videos, music and documents on my computer that I can only retrieve from my computer. If my computer got struck by

More information

The Answer to the 14 Most Frequently Asked Modbus Questions

The Answer to the 14 Most Frequently Asked Modbus Questions Modbus Frequently Asked Questions WP-34-REV0-0609-1/7 The Answer to the 14 Most Frequently Asked Modbus Questions Exactly what is Modbus? Modbus is an open serial communications protocol widely used in

More information

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012

COMP 250 Fall 2012 lecture 2 binary representations Sept. 11, 2012 Binary numbers The reason humans represent numbers using decimal (the ten digits from 0,1,... 9) is that we have ten fingers. There is no other reason than that. There is nothing special otherwise about

More information

Number Systems and Radix Conversion

Number Systems and Radix Conversion Number Systems and Radix Conversion Sanjay Rajopadhye, Colorado State University 1 Introduction These notes for CS 270 describe polynomial number systems. The material is not in the textbook, but will

More information

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic:

To convert an arbitrary power of 2 into its English equivalent, remember the rules of exponential arithmetic: Binary Numbers In computer science we deal almost exclusively with binary numbers. it will be very helpful to memorize some binary constants and their decimal and English equivalents. By English equivalents

More information

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System?

Management Challenge. Managing Hardware Assets. Central Processing Unit. What is a Computer System? Management Challenge Managing Hardware Assets What computer processing and storage capability does our organization need to handle its information and business transactions? What arrangement of computers

More information

4.3 TABLE 3 TABLE 4. 1342 five 1 125 3 25 4 5 2 1 125 75 20 2 222.

4.3 TABLE 3 TABLE 4. 1342 five 1 125 3 25 4 5 2 1 125 75 20 2 222. .3 Conversion Between Number Bases 169.3 Conversion Between Number Bases Although the numeration systems discussed in the opening section were all base ten, other bases have occurred historically. For

More information

NUMBER SYSTEMS. William Stallings

NUMBER SYSTEMS. William Stallings NUMBER SYSTEMS William Stallings The Decimal System... The Binary System...3 Converting between Binary and Decimal...3 Integers...4 Fractions...5 Hexadecimal Notation...6 This document available at WilliamStallings.com/StudentSupport.html

More information

lesson 1 An Overview of the Computer System

lesson 1 An Overview of the Computer System essential concepts lesson 1 An Overview of the Computer System This lesson includes the following sections: The Computer System Defined Hardware: The Nuts and Bolts of the Machine Software: Bringing the

More information

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

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

More information

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology

LSN 2 Number Systems. ECT 224 Digital Computer Fundamentals. Department of Engineering Technology LSN 2 Number Systems Department of Engineering Technology LSN 2 Decimal Number System Decimal number system has 10 digits (0-9) Base 10 weighting system... 10 5 10 4 10 3 10 2 10 1 10 0. 10-1 10-2 10-3

More information

YOU MUST BE ABLE TO DO THE FOLLOWING PROBLEMS WITHOUT A CALCULATOR!

YOU MUST BE ABLE TO DO THE FOLLOWING PROBLEMS WITHOUT A CALCULATOR! DETAILED SOLUTIONS AND CONCEPTS - DECIMALS AND WHOLE NUMBERS Prepared by Ingrid Stewart, Ph.D., College of Southern Nevada Please Send Questions and Comments to ingrid.stewart@csn.edu. Thank you! YOU MUST

More information

Useful Number Systems

Useful Number Systems Useful Number Systems Decimal Base = 10 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9} Binary Base = 2 Digit Set = {0, 1} Octal Base = 8 = 2 3 Digit Set = {0, 1, 2, 3, 4, 5, 6, 7} Hexadecimal Base = 16 = 2

More information

Chapter 2: Basics on computers and digital information coding. A.A. 2012-2013 Information Technology and Arts Organizations

Chapter 2: Basics on computers and digital information coding. A.A. 2012-2013 Information Technology and Arts Organizations Chapter 2: Basics on computers and digital information coding Information Technology and Arts Organizations 1 Syllabus (1/3) 1. Introduction on Information Technologies (IT) and Cultural Heritage (CH)

More information

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

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

More information

Unit 6 Number and Operations in Base Ten: Decimals

Unit 6 Number and Operations in Base Ten: Decimals Unit 6 Number and Operations in Base Ten: Decimals Introduction Students will extend the place value system to decimals. They will apply their understanding of models for decimals and decimal notation,

More information

Binary Adders: Half Adders and Full Adders

Binary Adders: Half Adders and Full Adders Binary Adders: Half Adders and Full Adders In this set of slides, we present the two basic types of adders: 1. Half adders, and 2. Full adders. Each type of adder functions to add two binary bits. In order

More information

Finding ASCII Codes for Special Fonts and Characters

Finding ASCII Codes for Special Fonts and Characters Finding Codes for Special Fonts and Characters WingDings and WebDIngs are special fonts that are pre-installed on all copies of Microsoft Windows XP. These fonts do not contain letters and numbers as we

More information

Chapter 5. Binary, octal and hexadecimal numbers

Chapter 5. Binary, octal and hexadecimal numbers Chapter 5. Binary, octal and hexadecimal numbers A place to look for some of this material is the Wikipedia page http://en.wikipedia.org/wiki/binary_numeral_system#counting_in_binary Another place that

More information

Section 1.5 Exponents, Square Roots, and the Order of Operations

Section 1.5 Exponents, Square Roots, and the Order of Operations Section 1.5 Exponents, Square Roots, and the Order of Operations Objectives In this section, you will learn to: To successfully complete this section, you need to understand: Identify perfect squares.

More information

The Subnet Training Guide

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

More information

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC

Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 INTRODUCTION TO DIGITAL LOGIC Levent EREN levent.eren@ieu.edu.tr A-306 Office Phone:488-9882 1 Number Systems Representation Positive radix, positional number systems A number with radix r is represented by a string of digits: A n

More information

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program. Name: Class: Date: Exam #1 - Prep True/False Indicate whether the statement is true or false. 1. Programming is the process of writing a computer program in a language that the computer can respond to

More information

Numbering Systems. InThisAppendix...

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

More information

Positional Numbering System

Positional Numbering System APPENDIX B Positional Numbering System A positional numbering system uses a set of symbols. The value that each symbol represents, however, depends on its face value and its place value, the value associated

More information

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping

AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping AQA GCSE in Computer Science Computer Science Microsoft IT Academy Mapping 3.1.1 Constants, variables and data types Understand what is mean by terms data and information Be able to describe the difference

More information

Numerator Denominator

Numerator Denominator Fractions A fraction is any part of a group, number or whole. Fractions are always written as Numerator Denominator A unitary fraction is one where the numerator is always 1 e.g 1 1 1 1 1...etc... 2 3

More information

6 The Hindu-Arabic System (800 BC)

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

More information

NUMBER SYSTEMS. 1.1 Introduction

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.

More information

Decimal to Binary Conversion

Decimal to Binary Conversion Decimal to Binary Conversion A tool that makes the conversion of decimal values to binary values simple is the following table. The first row is created by counting right to left from one to eight, for

More information

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6)

ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) ASSEMBLY LANGUAGE PROGRAMMING (6800) (R. Horvath, Introduction to Microprocessors, Chapter 6) 1 COMPUTER LANGUAGES In order for a computer to be able to execute a program, the program must first be present

More information

Count the Dots Binary Numbers

Count the Dots Binary Numbers Activity 1 Count the Dots Binary Numbers Summary Data in computers is stored and transmitted as a series of zeros and ones. How can we represent words and numbers using just these two symbols? Curriculum

More information

Grade 6 Math Circles. Binary and Beyond

Grade 6 Math Circles. Binary and Beyond Faculty of Mathematics Waterloo, Ontario N2L 3G1 The Decimal System Grade 6 Math Circles October 15/16, 2013 Binary and Beyond The cool reality is that we learn to count in only one of many possible number

More information

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions.

Unit 1 Number Sense. In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. Unit 1 Number Sense In this unit, students will study repeating decimals, percents, fractions, decimals, and proportions. BLM Three Types of Percent Problems (p L-34) is a summary BLM for the material

More information

ELECTRONIC DOCUMENT IMAGING

ELECTRONIC DOCUMENT IMAGING AIIM: Association for Information and Image Management. Trade association and professional society for the micrographics, optical disk and electronic image management markets. Algorithm: Prescribed set

More information

Traditional IBM Mainframe Operating Principles

Traditional IBM Mainframe Operating Principles C H A P T E R 1 7 Traditional IBM Mainframe Operating Principles WHEN YOU FINISH READING THIS CHAPTER YOU SHOULD BE ABLE TO: Distinguish between an absolute address and a relative address. Briefly explain

More information

Memory Systems. Static Random Access Memory (SRAM) Cell

Memory Systems. Static Random Access Memory (SRAM) Cell Memory Systems This chapter begins the discussion of memory systems from the implementation of a single bit. The architecture of memory chips is then constructed using arrays of bit implementations coupled

More information

ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER

ZIMBABWE SCHOOL EXAMINATIONS COUNCIL. COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER ZIMBABWE SCHOOL EXAMINATIONS COUNCIL General Certificate of Education Ordinary Level COMPUTER STUDIES 7014/01 PAPER 1 Multiple Choice SPECIMEN PAPER Candidates answer on the question paper Additional materials:

More information

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

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

More information

Lecture N -1- PHYS 3330. Microcontrollers

Lecture N -1- PHYS 3330. Microcontrollers Lecture N -1- PHYS 3330 Microcontrollers If you need more than a handful of logic gates to accomplish the task at hand, you likely should use a microcontroller instead of discrete logic gates 1. Microcontrollers

More information

Today s topics. Digital Computers. More on binary. Binary Digits (Bits)

Today s topics. Digital Computers. More on binary. Binary Digits (Bits) Today s topics! Binary Numbers! Brookshear.-.! Slides from Prof. Marti Hearst of UC Berkeley SIMS! Upcoming! Networks Interactive Introduction to Graph Theory http://www.utm.edu/cgi-bin/caldwell/tutor/departments/math/graph/intro

More information

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to:

Data Storage. Chapter 3. Objectives. 3-1 Data Types. Data Inside the Computer. After studying this chapter, students should be able to: Chapter 3 Data Storage Objectives After studying this chapter, students should be able to: List five different data types used in a computer. Describe how integers are stored in a computer. Describe how

More information

Financial Mathematics

Financial Mathematics Financial Mathematics For the next few weeks we will study the mathematics of finance. Apart from basic arithmetic, financial mathematics is probably the most practical math you will learn. practical in

More information

Basic numerical skills: FRACTIONS, DECIMALS, PROPORTIONS, RATIOS AND PERCENTAGES

Basic numerical skills: FRACTIONS, DECIMALS, PROPORTIONS, RATIOS AND PERCENTAGES Basic numerical skills: FRACTIONS, DECIMALS, PROPORTIONS, RATIOS AND PERCENTAGES. Introduction (simple) This helpsheet is concerned with the ways that we express quantities that are not whole numbers,

More information

winhex Disk Editor, RAM Editor PRESENTED BY: OMAR ZYADAT and LOAI HATTAR

winhex Disk Editor, RAM Editor PRESENTED BY: OMAR ZYADAT and LOAI HATTAR winhex Disk Editor, RAM Editor PRESENTED BY: OMAR ZYADAT and LOAI HATTAR Supervised by : Dr. Lo'ai Tawalbeh New York Institute of Technology (NYIT)-Jordan X-Ways Software Technology AG is a stock corporation

More information

Chapter 2. Binary Values and Number Systems

Chapter 2. Binary Values and Number Systems Chapter 2 Binary Values and Number Systems Numbers Natural numbers, a.k.a. positive integers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative numbers A

More information

Chapter 1. Binary, octal and hexadecimal numbers

Chapter 1. Binary, octal and hexadecimal numbers Chapter 1. Binary, octal and hexadecimal numbers This material is covered in the books: Nelson Magor Cooke et al, Basic mathematics for electronics (7th edition), Glencoe, Lake Forest, Ill., 1992. [Hamilton

More information

Binary Numbers. Binary Octal Hexadecimal

Binary Numbers. Binary Octal Hexadecimal Binary Numbers Binary Octal Hexadecimal Binary Numbers COUNTING SYSTEMS UNLIMITED... Since you have been using the 10 different digits 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9 all your life, you may wonder how

More information

CAs and Turing Machines. The Basis for Universal Computation

CAs and Turing Machines. The Basis for Universal Computation CAs and Turing Machines The Basis for Universal Computation What We Mean By Universal When we claim universal computation we mean that the CA is capable of calculating anything that could possibly be calculated*.

More information

NF5-12 Flexibility with Equivalent Fractions and Pages 110 112

NF5-12 Flexibility with Equivalent Fractions and Pages 110 112 NF5- Flexibility with Equivalent Fractions and Pages 0 Lowest Terms STANDARDS preparation for 5.NF.A., 5.NF.A. Goals Students will equivalent fractions using division and reduce fractions to lowest terms.

More information

1. The Fly In The Ointment

1. The Fly In The Ointment Arithmetic Revisited Lesson 5: Decimal Fractions or Place Value Extended Part 5: Dividing Decimal Fractions, Part 2. The Fly In The Ointment The meaning of, say, ƒ 2 doesn't depend on whether we represent

More information

Multiplying and Dividing Signed Numbers. Finding the Product of Two Signed Numbers. (a) (3)( 4) ( 4) ( 4) ( 4) 12 (b) (4)( 5) ( 5) ( 5) ( 5) ( 5) 20

Multiplying and Dividing Signed Numbers. Finding the Product of Two Signed Numbers. (a) (3)( 4) ( 4) ( 4) ( 4) 12 (b) (4)( 5) ( 5) ( 5) ( 5) ( 5) 20 SECTION.4 Multiplying and Dividing Signed Numbers.4 OBJECTIVES 1. Multiply signed numbers 2. Use the commutative property of multiplication 3. Use the associative property of multiplication 4. Divide signed

More information

Intel Hexadecimal Object File Format Specification Revision A, 1/6/88

Intel Hexadecimal Object File Format Specification Revision A, 1/6/88 Intel Hexadecimal Object File Format Specification Revision A, 1/6/88 DISCLAIMER Intel makes no representation or warranties with respect to the contents hereof and specifically disclaims any implied warranties

More information

Session 7 Fractions and Decimals

Session 7 Fractions and Decimals Key Terms in This Session Session 7 Fractions and Decimals Previously Introduced prime number rational numbers New in This Session period repeating decimal terminating decimal Introduction In this session,

More information

Welcome to Basic Math Skills!

Welcome to Basic Math Skills! Basic Math Skills Welcome to Basic Math Skills! Most students find the math sections to be the most difficult. Basic Math Skills was designed to give you a refresher on the basics of math. There are lots

More information

Pre-Algebra Lecture 6

Pre-Algebra Lecture 6 Pre-Algebra Lecture 6 Today we will discuss Decimals and Percentages. Outline: 1. Decimals 2. Ordering Decimals 3. Rounding Decimals 4. Adding and subtracting Decimals 5. Multiplying and Dividing Decimals

More information

All the examples in this worksheet and all the answers to questions are available as answer sheets or videos.

All the examples in this worksheet and all the answers to questions are available as answer sheets or videos. BIRKBECK MATHS SUPPORT www.mathsupport.wordpress.com Numbers 3 In this section we will look at - improper fractions and mixed fractions - multiplying and dividing fractions - what decimals mean and exponents

More information

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal:

1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: Exercises 1 - number representations Questions 1. Give the 16 bit signed (twos complement) representation of the following decimal numbers, and convert to hexadecimal: (a) 3012 (b) - 435 2. For each of

More information

Addition Methods. Methods Jottings Expanded Compact Examples 8 + 7 = 15

Addition Methods. Methods Jottings Expanded Compact Examples 8 + 7 = 15 Addition Methods Methods Jottings Expanded Compact Examples 8 + 7 = 15 48 + 36 = 84 or: Write the numbers in columns. Adding the tens first: 47 + 76 110 13 123 Adding the units first: 47 + 76 13 110 123

More information

CSI 333 Lecture 1 Number Systems

CSI 333 Lecture 1 Number Systems CSI 333 Lecture 1 Number Systems 1 1 / 23 Basics of Number Systems Ref: Appendix C of Deitel & Deitel. Weighted Positional Notation: 192 = 2 10 0 + 9 10 1 + 1 10 2 General: Digit sequence : d n 1 d n 2...

More information

Preparing Your Computer for LFS101x. July 11, 2014 A Linux Foundation Training Publication www.linuxfoundation.org

Preparing Your Computer for LFS101x. July 11, 2014 A Linux Foundation Training Publication www.linuxfoundation.org Preparing Your Computer for LFS101x July 11, 2014 A Linux Foundation Training Publication www.linuxfoundation.org This class is intended to be very hands-on: in order to learn about Linux you must use

More information

(Refer Slide Time: 00:01:16 min)

(Refer Slide Time: 00:01:16 min) Digital Computer Organization Prof. P. K. Biswas Department of Electronic & Electrical Communication Engineering Indian Institute of Technology, Kharagpur Lecture No. # 04 CPU Design: Tirning & Control

More information

MATHS ACTIVITIES FOR REGISTRATION TIME

MATHS ACTIVITIES FOR REGISTRATION TIME MATHS ACTIVITIES FOR REGISTRATION TIME At the beginning of the year, pair children as partners. You could match different ability children for support. Target Number Write a target number on the board.

More information

Dr Brian Beaudrie pg. 1

Dr Brian Beaudrie pg. 1 Multiplication of Decimals Name: Multiplication of a decimal by a whole number can be represented by the repeated addition model. For example, 3 0.14 means add 0.14 three times, regroup, and simplify,

More information

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 CDA 3200 Digital Systems Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012 Outline Data Representation Binary Codes Why 6-3-1-1 and Excess-3? Data Representation (1/2) Each numbering

More information

The theory of the six stages of learning with integers (Published in Mathematics in Schools, Volume 29, Number 2, March 2000) Stage 1

The theory of the six stages of learning with integers (Published in Mathematics in Schools, Volume 29, Number 2, March 2000) Stage 1 The theory of the six stages of learning with integers (Published in Mathematics in Schools, Volume 29, Number 2, March 2000) Stage 1 Free interaction In the case of the study of integers, this first stage

More information

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T) Unit- I Introduction to c Language: C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating

More information

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011

CS101 Lecture 11: Number Systems and Binary Numbers. Aaron Stevens 14 February 2011 CS101 Lecture 11: Number Systems and Binary Numbers Aaron Stevens 14 February 2011 1 2 1 3!!! MATH WARNING!!! TODAY S LECTURE CONTAINS TRACE AMOUNTS OF ARITHMETIC AND ALGEBRA PLEASE BE ADVISED THAT CALCULTORS

More information