# Number Systems and Data Representation CS221

Save this PDF as:

Size: px
Start display at page:

## Transcription

1 Number Systems and Data Representation CS221 Inside today s computers, data is represented as 1 s and 0 s. These 1 s and 0 s might be stored magnetically on a disk, or as a state in a transistor, core, or vacuum tube. To perform useful operations on these 1 s and 0 s we have to organize them together into patterns that make up codes. First we will discuss numeric values for the codes, and then ways that the codes represent textual values. Each 1 and 0 is called a bit. 4 bits is called a nibble. 8 bits is called a byte. 16/32/64/128 bits is called a word. The number depends upon the number of bits that can simultaneously be operated upon by the processor. Most processors today use 32 bits. Since we only have 1 s and 0 s available, the number system generally used inside the computer is the binary number system. We are used to the decimal number system. In decimal, we have ten symbols (0-9) that we can use. When all of the symbols are used up, we need to combine together two symbols to represent the next number (10). The most significant digit becomes our first digit, and the least significant digit cycles back to 0. The least significant digit increments until the symbols are used up, and which point the most significant digit is incremented to the next larger digit. This is just the familiar process of counting! The same process applies to the binary number system, but we only have two symbols available (0-1). When we run out of symbols, we need to combine them and increment the digits just as we would in a decimal, base 10, number system: Let s start counting to illustrate: Decimal Binary ? 17?

2 Binary to Decimal Conversion The binary number system is positional where each binary digit has a weight based upon its position relative to the least significant bit (LSB). To convert a binary number to decimal, sum together the weights. Each weight is calculated by multiplying the bit by 2 i, where i is the index relative to the LSB Weight = 1* * * * *2 4 = 1*1 + 1*2 + 0*4 + 0*8 + 1*16 = = 19 (base 10, decimal) What is 1111 in base 10? What is in base 10? Decimal to Binary Conversion To convert a decimal number to its equivalent binary number representation, the easiest method is to use repeated division by 2. Each time, save the remainder. The first remainder is the least significant bit. The last remainder is the most significant bit. What is 19 in binary? 19 / 2 = 9 remainder 1 LSB 9 / 2 = 4 remainder 1 4 / 2 = 2 remainder 0 2 / 2 = 1 remainder 0 1 / 2 = 0 remainder 1 MSB Our final number is If using a calculator, watch to see if the quotient has a fraction. If it is 0.5 then the remainder was 1, and repeat the process with the whole part minus the fraction. What is 83 in binary? What is 100 in binary? Octal Numbers The octal number system uses base 8 instead of base 10 or base 2. This is sometimes convenient since many computer operations are based on bytes (8 bits). In octal, we have 8 digits at our disposal, 0-7. Let s do the counting again:

3 Decimal Octal Octal to Decimal Conversion Converting octal to decimal is just like converting binary to decimal, except instead of powers of 2, we use powers of 8. That is, the LSB is 8 0, the next is 8 1, then 8 2, etc. To convert 172 in octal to decimal: Weight = 2* * *8 2 = 2*1 + 7*8 + 1*64 = 122 base 10 What is 104 in octal converted to decimal? What is 381 in octal converted to decimal? Decimal to Octal Conversion Converting decimal to octal is just like converting decimal to binary, except instead of dividing by 2, we divide by 8. To convert 122 to octal: 122 / 8 = 15 remainder 2 15 / 8 = 1 remainder 7 1 / 8 = 0 remainder 1 = 172 octal

4 If using a calculator to perform the divisions, the result will include a decimal fraction instead of a remainder. The remainder can be obtained by multiplying the decimal fraction by 8. For example, 122 / 8 = Then multiply 0.25 * 8 to get a remainder of 2. Octal to Binary, Binary to Octal Octal becomes very useful in converting to binary, because it is quite simple. The conversion can be done by looking at 3 bit combinations, and then concatenating them together. Here is the equivalent for each individual octal digit and binary representation: Octal Binary To convert back and forth between octal and binary, simply substitute the proper pattern for each octal digit with the corresponding three binary digits. For example, 372 in octal becomes or in binary. 777 in octal becomes or in binary. The same applies in the other direction: in binary becomes or 472 in octal. What is 441 octal in binary? What is binary in octal? Since it is so easy to convert back and forth between octal and binary, octal is sometimes used to represent binary codes. Octal is most useful if the binary code happens to be a multiple of 3 bits long. Sometimes it is quicker to convert decimal to binary by first converting decimal to octal, and then octal to binary. Hexadecimal Numbering The hexadecimal numbering system is the most common system seen today in representing raw computer data. This is because it is very convenient to represent groups of 4 bits. Consequently, one byte (8 bits) can be represented by two groups of four bits easily in hexadecimal.

5 Hexadecimal uses a base 16 numbering system. This means that we have 16 symbols to use for digits. Consequently, we must invent new digits beyond 9. The digits used in hex are the letters A,B,C,D,E, and F. If we start counting, we get the table below: Decimal Hexadecimal Binary A B C D E F Hex to Decimal Conversion Converting hex to decimal is just like converting binary to decimal, except instead of powers of 2, we use powers of 16. That is, the LSB is 16 0, the next is 16 1, then 16 2, etc. To convert 15E in hex to decimal: 1 5 E Weight = 14* * *16 2 = 14*1 + 5*16 + 1*256 = 350 base 10 What is F00 in hex converted to decimal? Decimal to Hex Conversion Converting decimal to hex is just like converting decimal to binary, except instead of dividing by 2, we divide by 16. To convert 350 to hex:

6 350 / 16 = 21 remainder 14 = E 21 / 16 = 1 remainder 5 1 / 16 = 0 remainder 1 So we get 15E for 350. Again, note that if a calculator is being used, you may multiple the fraction remainder by 16 to produce the remainder. 350/16 = Then to get the remainder, * 16 = 14. What is 33 in hex? Hex to Binary Conversion, Binary to Hex Going from hex to binary is similar to the process of converting from octal to binary. One must simply look up or compute the binary pattern of 4 bits for each hex code, and concatenate the codes together. To convert AE to binary: A = 1010 E = 1110 So AE in binary is The same process applies in reverse by grouping together 4 bits at a time and then look up the hex digit for each group. Binary broken up into groups of 4: (note the 0 added as padding on the MSB to get up to 4 bits) = 625 Hex How would you convert from Hex to Octal? E.g. convert B2F to octal. BCD Code When numbers, letters, words, or other pieces of data are represented by a special group of symbols, then we say that the data is encoded. The group of symbols is called a code. For example, Morse Code is a series of dashes and dots to represent letters. Decimal numbers may be represented using binary notation. When this is done, it is called a straight binary encoding.

7 Most systems use straight binary encoding to represent numbers. However, there are times when it is easier to use another means to represent numbers, particularly when we may want to retain some properties of decimal number systems. BCD, or binary coded decimal, is one such representation. BCD works by encoding each digit of a decimal number by its binary equivalent. Since a decimal digit can be as large as 9, we need 4 bits to code it (1001). Here is an example used to represent the decimal number 874: 8 = = = 0100 Note that 4 bits are always used for each digit. This results in the wasted space of bit patterns 9-F. If one of these patterns ever shows up when using BCD, it could be flagged as an error condition. What is 53 decimal in BCD? What is encoded in BCD in decimal? Keep in mind that BCD is not a number system like binary, octal, decimal or hexadecimal. Instead, it is an encoding scheme. It is actually equivalent to the decimal system with an encoding to binary. A BCD number is NOT the same as its binary equivalent number. The number 10 (decimal) could be represented as 1010 in binary encoding, but would be represented as in BCD. The main advantage in using BCD is that it is easy to convert back and forth between decimal. Alphanumeric Codes So far we have only been discussing the representation of numbers. We would also like to represent textual characters. This includes letters, numbers, punctuation marks, and other special characters like % or / that appear on a typical keyboard. The most common code is ASCII, the American Standard Code for Information Interchange. ASCII is comprised of a 7 bit code. This means that we have 2 7 or 128 possible code groups. This is plenty for English as well as control functions such as the carriage return or linefeed functions. Another code is EBCDIC, extended binary coded decimal interchange code. EBCDIC was used on some mainframe systems but is now out of favor. The table at the back of your assembly book has a complete listing of ASCII codes. A small sample is shown below.

8 Character ASCII Hex Decimal A B C Z 5A 90 Since most computers store data in bytes, or 8 bits, there is 1 bit that may go unused (or used for parity, described below). Could we represent something like Chinese in ASCII, which has many more than 128 characters? One way to represent languages such as Chinese is to use a different code. UNICODE is an international standard used to represent multiple languages. To address the shortcomings of ASCII, UNICODE uses 16 bits per character. This allows 216 or characters. When this is insufficient, there are extensions to support over a million characters. Most of the work in UNICODE has gone in efforts to define the codes for the particular languages. If you would like more information, visit There are Unicode definitions for lots of languages, even some that are made-up. Some example Unicode characters for Tengwar (a script of Elvish from Tolkien lore) is shown below. Side note: A common problem with software development occurs when a product needs to support foreign languages. Many products in the US are initially developed assuming ASCII. However, if the product is successful and needs to support something like French or German, it is often a difficult task to move the program from ASCII to UNICODE. Software developers need to carefully take into account future needs and design the software appropriately. If it is known up front that other languages may need to be supported, it is a relatively simple matter to support UNICODE up front, or to remove dependencies on ASCII.

9 Identifying Code and Data Although we might know the binary contents of memory, the actual usage of the memory is not always clear. This is because in the von Neumann model, memory could store data or instructions. Consequently, either the contents of memory could be a computer instruction, or it could be data. If it is data, there is no way to tell if the data represents ASCII encoding, a binary number, or maybe something else. A program must keep track of its data and the type of representation used to avoid possible confusion. High level languages like C++ or Java impose restrictions on the way variables and instructions are manipulated (data type restrictions) but assembly language does not. In assembly language, there are few restrictions, but the programmer is burdened with the responsibility of taking care of many details.

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

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

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

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

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

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

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

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

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

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

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

### Lecture 11: Number Systems

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

### Number Systems. Introduction / Number Systems

Number Systems Introduction / Number Systems Data Representation Data representation can be Digital or Analog In Analog representation values are represented over a continuous range In Digital representation

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

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

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

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

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

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

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

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

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

### Systems I: Computer Organization and Architecture

Systems I: Computer Organization and Architecture Lecture 2: Number Systems and Arithmetic Number Systems - Base The number system that we use is base : 734 = + 7 + 3 + 4 = x + 7x + 3x + 4x = x 3 + 7x

### 3. Convert a number from one number system to another

3. Convert a number from one number system to another Conversion between number bases: Hexa (16) Decimal (10) Binary (2) Octal (8) More Interest Way we need conversion? We need decimal system for real

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

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

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

### Goals. Unary Numbers. Decimal Numbers. 3,148 is. 1000 s 100 s 10 s 1 s. Number Bases 1/12/2009. COMP370 Intro to Computer Architecture 1

Number Bases //9 Goals Numbers Understand binary and hexadecimal numbers Be able to convert between number bases Understand binary fractions COMP37 Introduction to Computer Architecture Unary Numbers Decimal

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

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

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

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

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

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

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

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

### ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-470/570: Microprocessor-Based System Design Fall 2014.

REVIEW OF NUMBER SYSTEMS Notes Unit 2 BINARY NUMBER SYSTEM In the decimal system, a decimal digit can take values from to 9. For the binary system, the counterpart of the decimal digit is the binary digit,

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

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

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

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

### Number and codes in digital systems

Number and codes in digital systems Decimal Numbers You are familiar with the decimal number system because you use them everyday. But their weighted structure is not understood. In the decimal number

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

### CPEN 214 - Digital Logic Design Binary Systems

CPEN 4 - Digital Logic Design Binary Systems C. Gerousis Digital Design 3 rd Ed., Mano Prentice Hall Digital vs. Analog An analog system has continuous range of values A mercury thermometer Vinyl records

### Chapter 1: Digital Systems and Binary Numbers

Chapter 1: Digital Systems and Binary Numbers Digital age and information age Digital computers general purposes many scientific, industrial and commercial applications Digital systems telephone switching

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

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

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

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

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

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

### Unsigned Conversions from Decimal or to Decimal and other Number Systems

Page 1 of 5 Unsigned Conversions from Decimal or to Decimal and other Number Systems In all digital design, analysis, troubleshooting, and repair you will be working with binary numbers (or base 2). It

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

### A Step towards an Easy Interconversion of Various Number Systems

A towards an Easy Interconversion of Various Number Systems Shahid Latif, Rahat Ullah, Hamid Jan Department of Computer Science and Information Technology Sarhad University of Science and Information Technology

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

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

### CS201: Architecture and Assembly Language

CS201: Architecture and Assembly Language Lecture Three Brendan Burns CS201: Lecture Three p.1/27 Arithmetic for computers Previously we saw how we could represent unsigned numbers in binary and how binary

### Numeral Systems. The number twenty-five can be represented in many ways: Decimal system (base 10): 25 Roman numerals:

Numeral Systems Which number is larger? 25 8 We need to distinguish between numbers and the symbols that represent them, called numerals. The number 25 is larger than 8, but the numeral 8 above is larger

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

### Binary. ! You are probably familiar with decimal

Arithmetic operations in assembly language Prof. Gustavo Alonso Computer Science Department ETH Zürich alonso@inf.ethz.ch http://www.inf.ethz.ch/department/is/iks/ Binary! You are probably familiar with

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

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

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

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

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

### Digital Design. Assoc. Prof. Dr. Berna Örs Yalçın

Digital Design Assoc. Prof. Dr. Berna Örs Yalçın Istanbul Technical University Faculty of Electrical and Electronics Engineering Office Number: 2318 E-mail: siddika.ors@itu.edu.tr Grading 1st Midterm -

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

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

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

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

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

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

### DIGITAL FUNDAMENTALS lesson 4 Number systems

The decimal number system In the decimal number system the base is 0. For example the number 4069 means 4x000 + 0x00 + 6x0 + 9x. The powers of 0 with the number 4069 in tabelvorm are: power 0 3 0 2 0 0

### Data Storage. 1s and 0s

Data Storage As mentioned, computer science involves the study of algorithms and getting machines to perform them before we dive into the algorithm part, let s study the machines that we use today to do

### The programming language C. sws1 1

The programming language C sws1 1 The programming language C invented by Dennis Ritchie in early 1970s who used it to write the first Hello World program C was used to write UNIX Standardised as K&C (Kernighan

### Lecture 2: Number Representation

Lecture 2: Number Representation CSE 30: Computer Organization and Systems Programming Summer Session II 2011 Dr. Ali Irturk Dept. of Computer Science and Engineering University of California, San Diego

### IBM Emulation Mode Printer Commands

IBM Emulation Mode Printer Commands Section 3 This section provides a detailed description of IBM emulation mode commands you can use with your printer. Control Codes Control codes are one-character printer

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

### Computer Science PLUS I Volume 1 : Concepts Government of Tamilnadu

Computer Science PLUS I Volume 1 : Concepts Government of Tamilnadu Government of Tamilnadu First Edition 2005 Chairman Syllabus Committee Dr. Balagurusamy E, Vice Chancellor, Anna University, Chennai

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

### Japanese Character Printers EPL2 Programming Manual Addendum

Japanese Character Printers EPL2 Programming Manual Addendum This addendum contains information unique to Zebra Technologies Japanese character bar code printers. The Japanese configuration printers support

### THE BINARY NUMBER SYSTEM

THE BINARY NUMBER SYSTEM Dr. Robert P. Webber, Longwood University Our civilization uses the base 10 or decimal place value system. Each digit in a number represents a power of 10. For example, 365.42

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