Number systems Fall, 2007

Save this PDF as:
 WORD  PNG  TXT  JPG

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

Activity 1: Bits and Bytes

Activity 1: Bits and Bytes ICS3U (Java): Introduction to Computer Science, Grade 11, University Preparation Activity 1: Bits and Bytes The Binary Number System Computers use electrical circuits that include many transistors and

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

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

Data Representation. Data Representation, Storage, and Retrieval. Data Representation. Data Representation. Data Representation. Data Representation

Data Representation. Data Representation, Storage, and Retrieval. Data Representation. Data Representation. Data Representation. Data Representation , Storage, and Retrieval ULM/HHIM Summer Program Project 3, Day 3, Part 3 Digital computers convert the data they process into a digital value. Text Audio Images/Graphics Video Digitizing 00000000... 6/8/20

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

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

Number Systems, Base Conversions, and Computer Data Representation

Number Systems, Base Conversions, and Computer Data Representation , Base Conversions, and Computer Data Representation Decimal and Binary Numbers When we write decimal (base 10) numbers, we use a positional notation system. Each digit is multiplied by an appropriate

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

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

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

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

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

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

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

Bits, bytes, and representation of information

Bits, bytes, and representation of information Bits, bytes, and representation of information digital representation means that everything is represented by numbers only the usual sequence: something (sound, pictures, text, instructions,...) is converted

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

Section 1.5 Arithmetic in Other Bases

Section 1.5 Arithmetic in Other Bases Section Arithmetic in Other Bases Arithmetic in Other Bases The operations of addition, subtraction, multiplication and division are defined for counting numbers independent of the system of numeration

More information

CS 16: Assembly Language Programming for the IBM PC and Compatibles

CS 16: Assembly Language Programming for the IBM PC and Compatibles CS 16: Assembly Language Programming for the IBM PC and Compatibles First, a little about you Your name Have you ever worked with/used/played with assembly language? If so, talk about it Why are you taking

More information

Bits and Bytes. Computer Literacy Lecture 4 29/09/2008

Bits and Bytes. Computer Literacy Lecture 4 29/09/2008 Bits and Bytes Computer Literacy Lecture 4 29/09/2008 Lecture Overview Lecture Topics How computers encode information How to quantify information and memory How to represent and communicate binary data

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

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

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

= 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

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

Bits, Bytes, and Codes

Bits, Bytes, and Codes Bits, Bytes, and Codes Telecommunications 1 Peter Mathys Black and White Image Suppose we want to draw a B&W image on a computer screen. We first subdivide the screen into small rectangles or squares called

More information

Decimal Numbers: Base 10 Integer Numbers & Arithmetic

Decimal Numbers: Base 10 Integer Numbers & Arithmetic Decimal Numbers: Base 10 Integer Numbers & Arithmetic Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Example: 3271 = (3x10 3 ) + (2x10 2 ) + (7x10 1 )+(1x10 0 ) Ward 1 Ward 2 Numbers: positional notation Number

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Accuplacer Arithmetic Study Guide

Accuplacer Arithmetic Study Guide Testing Center Student Success Center Accuplacer Arithmetic Study Guide I. Terms Numerator: which tells how many parts you have (the number on top) Denominator: which tells how many parts in the whole

More information

Number Systems I. CIS008-2 Logic and Foundations of Mathematics. David Goodwin. 11:00, Tuesday 18 th October

Number Systems I. CIS008-2 Logic and Foundations of Mathematics. David Goodwin. 11:00, Tuesday 18 th October Number Systems I CIS008-2 Logic and Foundations of Mathematics David Goodwin david.goodwin@perisic.com 11:00, Tuesday 18 th October 2011 Outline 1 Number systems Numbers Natural numbers Integers Rational

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

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

CHAPTER 3 Numbers and Numeral Systems

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,

More information

Signed Binary Arithmetic

Signed Binary Arithmetic Signed Binary Arithmetic In the real world of mathematics, computers must represent both positive and negative binary numbers. For example, even when dealing with positive arguments, mathematical operations

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

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

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

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

OPERATIONS: x and. x 10 10

OPERATIONS: x and. x 10 10 CONNECT: Decimals OPERATIONS: x and To be able to perform the usual operations (+,, x and ) using decimals, we need to remember what decimals are. To review this, please refer to CONNECT: Fractions Fractions

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

Computer Systems. Computer Systems COMP1208. Objectives of the Module. Course Assessment. Reading List. What will you need

Computer Systems. Computer Systems COMP1208. Objectives of the Module. Course Assessment. Reading List. What will you need Computer Systems Computer Systems Lecturer: Ruth Coffey Room KE-4-027, email: ruth.coffey@dit.ie Today s Lecture >> Module Overview Objectives of Module Course Assessment Reading List Introduction to Computer

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

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

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

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

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

2 Programs: Instructions in the Computer

2 Programs: Instructions in the Computer 2 2 Programs: Instructions in the Computer Figure 2. illustrates the first few processing steps taken as a simple CPU executes a program. The CPU for this example is assumed to have a program counter (PC),

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

Binary Numbers The Computer Number System

Binary Numbers The Computer Number System Binary Numbers The Computer Number System Number systems are simply ways to count things. Ours is the base-0 or radix-0 system. Note that there is no symbol for 0 or for the base of any system. We count,2,3,4,5,6,7,8,9,

More information

Character Codes for Modern Computers

Character Codes for Modern Computers Character Codes for Modern Computers This lecture covers the standard ways in which characters are stored in modern computers. There are five main classes of characters. 1. Alphabetic characters: upper

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

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

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

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

Introduction to Computer Science

Introduction to Computer Science Introduction to Computer Science 11/17/2008 1. (5%) How many bytes of memory are needed to store a full screen of data if the screen is made of 48 lines with 80 characteristics in each line? The system

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

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

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

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

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

LABORATORY. Exploring Number Systems OBJECTIVES REFERENCES

LABORATORY. Exploring Number Systems OBJECTIVES REFERENCES Dmitriy Shironosov/ShutterStock, Inc. LABORATORY Exploring Number Systems 2 OBJECTIVES Experiment with number systems. Gain practice adding in binary and converting between bases. REFERENCES Software needed:

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

Hardware: Input, Processing, and Output Devices

Hardware: Input, Processing, and Output Devices Hardware: Input, Processing, and Output Devices Computer Systems Hardware Components Execution of an Instruction Processing Characteristics and Functions Physical Characteristics of CPU Memory Characteristics

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

The Essentials of Computer Organization and Architecture. Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003

The Essentials of Computer Organization and Architecture. Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 The Essentials of Computer Organization and Architecture Linda Null and Julia Lobur Jones and Bartlett Publishers, 2003 Chapter 2 Instructor's Manual Chapter Objectives Chapter 2, Data Representation,

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

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

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

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

Linotype-Hell. Scanned File Size. Technical Information

Linotype-Hell. Scanned File Size. Technical Information Technical Information Scanned File Size Linotype-Hell Once you start scanning images and reproducing them as halftones, you find out very quickly that the file sizes can be enormous. It is therefore important

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

198:211 Computer Architecture

198:211 Computer Architecture 198:211 Computer Architecture Topics: Lecture 8 (W5) Fall 2012 Data representation 2.1 and 2.2 of the book Floating point 2.4 of the book 1 Computer Architecture What do computers do? Manipulate stored

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

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

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

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

Why Vedic Mathematics?

Why Vedic Mathematics? Why Vedic Mathematics? Many Indian Secondary School students consider Mathematics a very difficult subject. Some students encounter difficulty with basic arithmetical operations. Some students feel it

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

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

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

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

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

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

COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13

COMPASS Numerical Skills/Pre-Algebra Preparation Guide. Introduction Operations with Integers Absolute Value of Numbers 13 COMPASS Numerical Skills/Pre-Algebra Preparation Guide Please note that the guide is for reference only and that it does not represent an exact match with the assessment content. The Assessment Centre

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

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

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

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