Computer Arithmetic: Binary, Octal and Hexadecimal Presented by Frank H. Osborne, Ph. D. © 2005 ID 2950 Technology and the Young Child.

Slides:



Advertisements
Similar presentations
© 2004, Robert K. Moniot Binary and Hex How to count like a computer.
Advertisements

A-Level Computing#BristolMet Session Objectives#8 express numbers in binary, octal and hexadecimal explain the use of code to represent a character set.
Company LOGO Edit your slogan here DKT 122/3 DIGITAL SYSTEM 1 WEEK #3 NUMBER SYSTEMS, OPERATION & CODES (PART 2)
Representing Data, Pictures, Time, and Size in Computer
Data Representation in Computers
1 Chapter 20 — Creating Web Projects Microsoft Visual Basic.NET, Introduction to Programming.
Binary and Decimal Numbers
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
CCE-EDUSAT SESSION FOR COMPUTER FUNDAMENTALS Date: Session III Topic: Number Systems Faculty: Anita Kanavalli Department of CSE M S Ramaiah.
Binary Conversions Number systems Binary to decimal Decimal to binary.
Data Storage Introduction to computer, 2nd semester, 2010/2011 Mr.Nael Aburas Faculty of Information Technology Islamic.
Hexadecimal and ASCII Lesson Objective: Understand the purpose of ASCII and how to use it. Lesson Outcome: Convert between Hexadecimal and ASCII Convert.
Section 4.3 Other Bases.
Agenda Data Representation Purpose Numbering Systems Binary, Octal, Hexadecimal (Hex) Numbering System Conversions Binary to Octal, Octal to Binary Binary.
©Brooks/Cole, 2003 Chapter 2 Data Representation.
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Programmable Logic Controllers
ACOE1611 Data Representation and Numbering Systems Dr. Costas Kyriacou and Dr. Konstantinos Tatas.
EKT 121 / 4 ELEKTRONIK DIGIT 1 CHAPTER 1 : INTRODUCTION.
IT-101 Section 001 Lecture #3 Introduction to Information Technology.
Data Representation S2. This unit covers how the computer represents- Numbers Text Graphics Control.
Chapter 2 Computer Hardware
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Representing Data. Representing data u The basic unit of memory is the bit  A transistor that can hold either high or low voltage  Conceptually, a tiny.
Copyright © 2002 W. A. Tucker1 Chapter 7 Lecture Notes Bill Tucker Austin Community College COSC 1315.
Lec 3: Data Representation Computer Organization & Assembly Language Programming.
Computing Theory – F453 Number Systems. Data in a computer needs to be represented in a format the computer understands. This does not necessarily mean.
Number Systems CIT Network Math
Number systems, Operations, and Codes
The Hexadecimal Number System and Memory Addressing ISAT 121.
1 IT 231, CMPE 331 Digital Logic Design Week 2 Number systems and arithmetic.
Computer Science Binary. Binary Code Remember the power supply that is inside your computer and how it sends electricity to all of the components? That.
Section 4.3 Other Bases.
Data Representation, Number Systems and Base Conversions
AEEE2031 Data Representation and Numbering Systems.
Number Systems Denary Base 10 Binary Base 2 Hexadecimal Base 16
HEXADECIMAL NUMBERS.
Data Representation. What is data? Data is information that has been translated into a form that is more convenient to process As information take different.
School of Computer and Communication Engineering, UniMAP Mohd ridzuan mohd nor DKT 122/3 - DIGITAL SYSTEM I Chapter.
Spiderman ©Marvel Comics Creating Web Pages (part 1)
Data Representation. How is data stored on a computer? Registers, main memory, etc. consists of grids of transistors Transistors are in one of two states,
Information in Computers. Remember Computers Execute algorithms Need to be told what to do And to whom to do it.
A+ Computer Repair Lesson 3: Number System. Objectives Define binary, decimal, octal, and hexadecimal numbering systems. Define binary, decimal, octal,
What do you think this lesson is all about? Write your answer on a sticky note.
Binary a. express numbers in binary, binary-coded decimal (BCD), octal and hexadecimal;
Searching Binary and Hexadecimal numeral systems
Binary Representation in Text
Binary Representation in Text
Number Systems.
Computer Applications for Biological
NUMBER SYSTEMS.
Lec 3: Data Representation
Unit 18: Computational Thinking
3.1 Denary, Binary and Hexadecimal Number Systems
CHAPTER 1 : INTRODUCTION
Data Transfer ASCII FILES.
Introduction to Computers
Information Support and Services
What is Binary? Binary is a two-digit (Base-2) numerical system, which computers use to process and store data. The reason computers use the binary system.
EPSII 59:006 Spring 2004.
Number System conversions
Coding Schemes and Number Systems
Data Storage Introduction to computer, 2nd semester, 2010/2011
Ch2: Data Representation
Numbering System TODAY AND TOMORROW 11th Edition
COMS 161 Introduction to Computing
Number Theory.
Computer Architecture CST 250
Chapter 3 - Binary Numbering System
Section 4.3 Other Bases.
Presentation transcript:

Computer Arithmetic: Binary, Octal and Hexadecimal Presented by Frank H. Osborne, Ph. D. © 2005 ID 2950 Technology and the Young Child

Bits and Bytes A bit is a binary digit. A bit is like a light switch. It has two positions, off = 0 and on = 1.

Bits and Bytes A byte is like a row of 8 switches.

Bits and Bytes Because it has only two digits, 0 and 1, the binary number system is base 2. We are accustomed to using base 10 which has 10 digits which are as follows: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 Computers work in base 2 while we work in base 10.

Review of Base 10 Consider the number is the thousands place = 3000 = 3 x is the hundreds place = 100 = 1 x is the tens place = 70 = 7 x is the units place = 8 = 8 x 10 0

Review of Base 10 Each numeral is multiplied by 10 raised to the appropriate power for its position.

Review of Base 2 A byte is 8 bits which are like 8 switches.

Properties of Base 2 Each numeral is multiplied by 2 raised to the appropriate power for its position. So, a byte can hold a number between 0 and 255.

Converting Base 2 Numbers to Base 10 What is the value of in base 10? The answer is 73.

To solve this type of question, remember the sequence of positions. The values are in the following sequence: 1, 2, 4, 8, 16, 32, 64, 128 Find which switches are on and add the values together.

Octal is Base 8 If we take the bits by threes, we get octal, which is base 8. The base 8 numerals are: 0, 1, 2, 3, 4, 5, 6, 7 The positions for the octal digits are: 000 = 0100 = = 1101 = = 2110 = = 3111 = 7

Use of Octal Some computers actually use octal for calculations but it is a big problem because the 8-bit byte is not evenly divisible by 3. Octal us used for setting the UNIX access rights to directories on server computers. You will use this for sure if you are putting things into a directory on a server for use on the Internet.

Setting UNIX Access Rights UNIX access rights are assigned to every file and directory on the server. Rights have the form: drwxrwxrwx –d means if it is a directory or not –r means read –w means write –x means execute There are three sets of rwx rights. These are for you, for those in your group and for everyone else. Each letter is one bit.

Setting UNIX Access Rights On the Kean turbo server, a faculty member may have an account. All other faculty are in the same group. Anyone from the outside, such as on the World Wide Web, can have access if the rights are set correctly.

Setting UNIX Access Rights drwxrwxrwx - The first set of bits is for yourself. You want to be able to read, write, create, delete or alter your file without any problems. Use octal 7 = 111 to set this part. drwxrwxrwx - This is for your group--the other users at your place. Unless you want someone monkeying with your files, let them have read-only (100 = 4) which makes it r--. If you do not want them to know it is there, set it to 000 = 0, which makes it ---.

Setting UNIX Access Rights drwxrwxrwx - The last set of bits is for everybody else. For your Internet pages, make a directory called www and set the access rights to 100 which makes it read-only. The server will let anyone on the Internet read the contents, but they will not be able to delete or change anything. So, your www directory is set as 447 which corresponds to dr--r--rwx.

Hexadecimal is Base 16 If we take the bits by fours, we get hexadecimal, which is base 16. The base 16 numerals are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, A, B, C, D, E, F As base 10 does not have single numerals for the numbers from we use A-F.

Table of Binary and Hex Equivalents

Properties of Hexadecimal A hexadecimal number is exactly one- half of a byte. Since a byte can be from in decimal, it also can be from #00 to #FF in hexadecimal. Use the pound sign (#) as a prefix for hexadecimal numbers. Binary and hexadecimal numbers carry to the other half of the same byte at the same time.

Uses of Hexadecimal On the Internet, documents are written in HTML, the hypertext markup language. All colors on computers are a combination of three colors; red, blue and green; known as RGB. In HTML, you set the values of RGB using hexadecimal numbers. The form for a color is: #RRGGBB

Some Hexadecimal HTML Color Codes

More about Hexadecimal Color Codes With #RRGGBB, each can have a value from 0 to 255. This gives: 256 x 256 x 256 = 16, 777, 216 different possible colors. The most commonly used hex values are: #00, #33, #66, #99, #CC, and #FF. These give a total of 216 colors. Find Dave Taylor's list at the following url:

ASCII Codes ASCII stands for American Standard Code for Information Interchange. ASCII values range from 0 to 255. –Values 0 through 31 - control characters –32 through 47 are special keyboard characters –48 through 64 are numerals and characters –65 through 96 capital letters and characters –97 through 127 lower case letters and characters –128 through 255 special characters

The End