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

Save this PDF as:

Size: px
Start display at page:

## Transcription

2 we don t need to do Binary arithmetic, or Octal or Hexadecimal arithmetic for that matter. The computer does all of that for us. Suppose you need to convert a Binary number to Decimal, and vice versa? Now that you're back up off the floor, let me tell you that the likelihood you'll ever need to do that is remove. However, just in case, I d like to show you how to convert a Binary Number to a Decimal one. The easy way is to use the Windows calculator. If you open up the calculator, select View from the Calculator s menu, and then select Scientific, you can use the calculator to perform this conversion. For instance, the ASCII chart included as Appendix D of the book indicates that the capital letter 'J' is equal to the Decimal value of '74'. It also is equivalent to the Binary value of ' '. Let's see the conversion in action. Just key in the number that you wish to convert---in this case '74'. And then select the option button corresponding the number system you wish to convert to---in this case Bin for Binary. (2 of 12)3/28/ :43:16 AM

3 As you can see, the Binary equivalent of Decimal '74' is ' '. Now I know that you really want to know how this is done. So, let s take a shot at converting this operation on our own. First, the Binary to Decimal conversion. You re going to need a piece of scrap paper for this one. Write down these numbers at the top of a sheet of paper These numbers represent, from right to left, 2 raised to the power of 0, 2 raised to the power of 1, 2 raised to the power of 2, all the way through to 2 raised to the power of 7. Underneath of the first line of numbers is the value equating to the Exponentiation. There are two rules to remember. Any number raised to the power of 0 is 1. And any number raised to the power of 1 is itself. Now take the number you want to convert (in this case, Binary ' '), and place this number underneath of the Powers of two, one by one starting from the left and working your way to the right. Like so. (3 of 12)3/28/ :43:16 AM

4 Now multiply each number by the value above it and add the results. Like so x 0 x 1 x 0 x 0 x 1 x 0 x1 x = 74 The result of the addition is the Decimal Equivalent of the Binary number Converting from a Decimal number to a Binary number isn t quite as easy. It requires us to do a form of division. But hang on, it s not as bad as it sounds. Let s convert the Decimal number 74 back to a Binary number. Here are the steps we need to perform. 1. Start with the Decimal number Take the number 74, and attempt to divide 128 into it. It doesn t go, so 3. Take the number 74, and attempt to divide 64 into it. It goes once, so write 1 down. 4. Subtract 64 from 74, and write the remainder 10 down. 5. Take the number 10, and attempt to divide 32 into it. It doesn t go, so 6. Take the number 10, and attempt to divide 16 into it. It doesn t go, so 7. Take the number 10, and attempt to divide 8 into it. It goes once, so write 1 down. (4 of 12)3/28/ :43:16 AM

5 8. Subtract 8 from 10, and write the remainder 2 down. 9. Take the number 2, and attempt to divide 4 into it. It doesn t go, so 10. Take the number 2, and attempt to divide 2 into it. It goes once, so write 1 down. 11. Subtract 2 from 2, and write the remainder 0 down. 12. Take the number 0, and attempt to divide 1 into it. It doesn t go, so Numbers written down: How do you decide which numbers to divide by? These are the same numbers that are the column headers for the conversion from Binary to Decimal. The numbers you ve written down, from left to right, are the Binary equivalent of Decimal 74! (5 of 12)3/28/ :43:16 AM

6 The largest 8 digit Binary number you can have is which equates to Decimal 255. The Octal System The Octal number system uses only 8 numbers: 0,1,2,3,4,5,6, and 7. Just as we saw earlier with the Binary and Decimal systems, it is also possible to add numbers in the Octal system. In Octal, you carry whenever your result will be greater than 7. In Octal arithmetic, adding 1 to 7 gives you 10, which is not read as ten but as One Zero Octal. Let's continue working with the ASCII values for the capital letter 'J'. We saw that the Decimal equivalent is '74', and the Binary equivalent is ' '. What about the Octal equivalent? The ASCII chart in Appendix D indicates that the capital letter J is equivalent to a the Octal value of '112'. Again, you can use the Windows calculator to verify that, or you can use the same method we used to convert a Binary number to a Decimal number. Again, you re going to need a piece of scrap paper for this one. Write down these numbers at the top of a sheet of paper These numbers represent, from right to left, 8 raised to the power of 0, 8 raised to the power of 1, 8 raised to the power of 2, all the way through to 8 raised to the power of 4. Underneath of the first line of numbers is the value equating to the Exponentiation. Again, two rules to remember. Any number raised to the power of 0 is 1. And any number raised to the power of 1 is itself. Now take the number you want to convert (in this case, Octal '112'), and place this number underneath of the Powers of eight, one by one starting from the left and working your way to the right. Like so Now multiply each number by the value above it and add the results. Like so. (6 of 12)3/28/ :43:16 AM

7 x 0 x 1 x 1 x = 74 The result of the addition is the Decimal Equivalent of the Octal number 74. We can convert from Decimal to Octal in a similar manner to the way we converted from Decimal to Binary. Except that there are fewer steps. 1. Start with the Decimal number Take the number 74, and attempt to divide 512 into it. It doesn t go, so 3. Take the number 74, and attempt to divide 64 into it. It goes once, so write 1 down. 4. Subtract 64 from 74, and write the remainder 10 down. 5. Take the number 10, and attempt to divide 8 into it. It goes once, so write 1 down. 6. Subtract 8 from 10, and write the remainder 2 down. 7. Take the number 2, and attempt to divide 1 into it. It goes twice, so write 2 down. Numbers written down: 0112 How do you decide which numbers to divide by? These are the same numbers that are the column headers in the conversion from Octal to Decimal. (7 of 12)3/28/ :43:16 AM

9 A + 1 = B (The Decimal equivalent is 11) B + 1 = C (The Decimal equivalent is 12) C + 1 = D (The Decimal equivalent is 13) D + 1 = E (The Decimal equivalent is 14) E + 1 = F (The Decimal equivalent is 15) F + 1 = 10 (The Decimal equivalent is 16) As it turns out, it isn t until the result of a Hex addition is greater than 'F' that we carry. Just as we did in the other number systems, we place a zero down and carry the 1. 'F' + 1 is 10, which is not read as 'ten' but as, you guessed it, One Zero Hexadecimal. Its Decimal equivalent is 16. Let's continue working with the ASCII values for the capital letter 'J'. We saw that the Decimal equivalent is '74', the Binary equivalent is ' ', and the Octal value is '112'. What about the Hexadecimal value? According to the ASCII chart in Appendix D, the Hex value is '4A'. How do we convert that to Decimal? Don t forget, if your patience is wearing thin, you can always use the calculator. But I know that you re starting to get the feeling for this. Again, you re going to need a piece of scrap paper for this one. Write down these numbers at the top of the paper These numbers represent, from right to left, 16 raised to the power of 0, 16 raised to the power of 1, and 16 raised to the power of 2. (For larger Hex numbers, we would need to add additional columns.). Underneath of the first line is the value equating to the Exponentiation. Again, two rules to remember. Any number raised to the power of 0 is 1. And any number raised to the power of 1 is itself. Now take the number you want to convert (in this case, Hex '4A'), and place this number underneath of the Powers of sixteen, one by one starting from the left and working your way to the right. Like so (9 of 12)3/28/ :43:16 AM

10 A Now multiply each number by the value above it and add the results. Like so x 0 x 4 x A = 74 The result of the addition is the Decimal equivalent of the Hexadecimal number 4A. You probably found that this conversion was a little trickier than the previous examples because you had to handle the hex multiplication of 1 X A Remember, in Hex, the letter A equates to Decimal 10, so that expression is really the same as 1 X 10 We can convert from Decimal to Hex in a similar manner to the way we converted from Decimal to Binary. Except that there are fewer steps. 1. Start with the Decimal number Take the number 74, and attempt to divide 256 into it. It doesn t go, so 3. Take the number 74, and attempt to divide 16 into it. It goes into it 4 times, so write 4 down. 4. Multiply 4 by 16 (in Decimal), and subtract 64 from 74. Write the remainder 10 down. 5. Take the number 10, and attempt to divide 1 into it. It goes ten times. But you can t write 10 down, you have to write the Hex equivalent of 10 which is A (10 of 12)3/28/ :43:16 AM

11 Numbers written down: 04A How do you decide which numbers to divide by? These are the same numbers that are the column headers in the conversion from Hex to Decimal. The numbers you ve written down, from left to right, are the Hex equivalent of Decimal 74! Is there an easier way to do these conversions? Nothing could be easier than using the Windows calculator to perform these conversions.. Unfortunately, you can't use the Windows calculator in code to perform these conversions. There are two functions, Hex and Oct that will return Decimal values. These are really pretty easy to use, and I ll leave it up to you read up on them in On-line Help. When am I likely to use Hex? Most beginners are happy to hear that they're not likely to use Hex all that often. But one place you're bound to run into Hexadecimal values is any property that sets or returns a color related value. You ll know that you re dealing with a Hex number because the number will have an ampersand and the letter H in front of it. (11 of 12)3/28/ :43:16 AM

12 For instance, this value &H00FFFFFF& is a value that you might see in the BackColor property of a form. &H lets you know that you are dealing with a Hexadecimal Value. If by chance you see this &O & you know you are looking at an Octal number because of the leading &O value. I talk about Visual Basic Color properties in another article. (12 of 12)3/28/ :43:16 AM

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

### MATH 2420 Discrete Mathematics Lecture notes Numbering Systems

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

### OCTAL, BINARY, AND HEXADECIMAL NUMBERS

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

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

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

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

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

### OCTAL, BINARY, AND HEXADECIMAL NUMBERS

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

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

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

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

### Number Systems Richard E. Haskell

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

### Common Number Systems Number Systems

5/29/204 Common Number Systems Number Systems System Base Symbols Used by humans? Used in computers? Decimal 0 0,, 9 Yes No Binary 2 0, No Yes Octal 8 0,, 7 No No Hexadecimal 6 0,, 9, A, B, F No No Number

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

### Note that the exponents also decrease by 1 with each column move to the right, so the

Base Systems Jacqueline A. Jones People use the decimal number system to perform arithmetic operations. Computers, on the other hand, use the binary system, which contains only two digits: 0 and 1. We

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

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

### CHAPTER 3 Number System and Codes

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

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

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

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

### 3. BINARY NUMBERS AND ARITHMETIC

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

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

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

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

### Lab Using the Windows Calculator with Network Addresses

Lab 5.1.4 Using the Windows Calculator with Network Addresses Objectives Switch between the two Windows Calculator modes. Use Windows Calculator to convert between decimal, binary, and hexadecimal. Use

### Introduction ToNumber Systems

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

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

### UNIT 2 : NUMBER SYSTEMS

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

### Data Representation. Why Study Data Representation?

Why Study Data Representation? Computers process and store information in binary format For many aspects of programming and networking, the details of data representation must be understood C Programming

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

### Collin's Lab: Binary & Hex

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

### COMP2121: Microprocessors and Interfacing

Interfacing Lecture 3: Number Systems (I) http://www.cse.unsw.edu.au/~cs2121 Lecturer: Hui Wu Session 2, 2005 Overview Positional notation Decimal, hexadecimal and binary One complement Two s complement

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

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

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

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

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

### Chapter 2 Numeric Representation.

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

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

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

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

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

### Session 7 Fractions and Decimals

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

### Exploring Number System

Exploring Number System Mun Chou, Fong QED Education Scientific Malaysia LEVEL High schools after students have been introduced to concepts of number systems. OBJECTIVES To explore converting between binary,

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

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

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

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

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

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

### Numbering Systems APPENDIX B B.1 BASE 10: DECIMAL

APPENDIX B Numbering We use different numbering systems: base 10 (decimal), base 2 (binary), base 8 (octal), base 16 (hexadecimal), base 256, and so on. All the numbering systems examined here are positional,

### MEP Y9 Practice Book A

1 Base Arithmetic 1.1 Binary Numbers We normally work with numbers in base 10. In this section we consider numbers in base 2, often called binary numbers. In base 10 we use the digits 0, 1, 2, 3, 4, 5,

### Chapter 3: Number Systems

Slide 1/40 Learning Objectives In this chapter you will learn about: Non-positional number system Positional number system Decimal number system Binary number system Octal number system Hexadecimal number

### Lesson 14..Binary, Hex, and Octal

Lesson 14..Binary, Hex, and Octal 14-1 We will examine four different number systems here, decimal, binary, hexadecimal (hex), and octal. In your study of these number systems it is very important to note

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

### Understanding Binary Numbers. Different Number Systems. Conversion: Bin Hex. Conversion MAP. Binary (0, 1) Hexadecimal 0 9, A(10), B(11),, F(15) :

Understanding Binary Numbers Computers operate on binary values (0 and 1) Easy to represent binary values electrically Voltages and currents. Can be implemented using circuits Create the building blocks

### Everything you wanted to know about Visual Basic 6 Colors

Everything you wanted to know about Visual Basic 6 Colors The topic of beautifying your Visual Basic program is always a popular one in my classes. If you are like most of my Visual Basic students, right

### Data Representation in Computers

Chapter 3 Data Representation in Computers After studying this chapter the student will be able to: *Learn about binary, octal, decimal and hexadecimal number systems *Learn conversions between two different

### Number systems Fall, 2007

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

### Binary Representation and Computer Arithmetic

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

### DIT250 / BIT180 - MATHEMATICS. Number Bases. Decimal numbers (base ten), Decimal numbers (base ten), Decimal numbers (base ten), 3/24/2014

DIT250 / BIT180 - MATHEMATICS ASSESSMENT CA 40% 3 TESTS EXAM 60% LECTURE SLIDES www.lechaamwe.weebly.com Lecture notes DIT250/BIT180 Number Bases In this lesson we shall discuss different Number Bases,

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

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

### Number Systems. Decimal Number System. Number Systems Week 3

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

### Chapter No.5 DATA REPRESENTATION

Chapter No.5 DATA REPRESENTATION Q.5.01 Complete the following statements. i) Data is a collection of ii) Data becomes information when properly. iii) Octal equivalent of binary number 1100010 is iv) 2

### Digital Fundamentals

Digital Fundamentals with PLD Programming Floyd Chapter 2 29 Pearson Education Decimal Numbers The position of each digit in a weighted number system is assigned a weight based on the base or radix of

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

### Number Systems and Base Conversions

Number Systems and Base Conversions As you know, the number system that we commonly use is the decimal or base- 10 number system. That system has 10 digits, 0 through 9. While it's very convenient for

### NUMBERSYSTEMS hundreds 8 tens 5 ones Thus,the numeral 485 represents the number four-hundred eighty-five and can be written in expanded formas

NUMBERSYSTEMS We noted in several places that a binary scheme having only the two binary digits 0 and 1 is used to represent information in a computer. In PART OF THE PIC- TURE: Data Representation in

### Lecture 1: Digital Systems and Binary Numbers

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

### Presented By: Ms. Poonam Anand

Presented By: Ms. Poonam Anand Know the different types of numbers Describe positional notation Convert numbers in other bases to base 10 Convert base 10 numbers into numbers of other bases Describe the

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

Number System Introduction Number systems provide the basis for all operations in information processing systems. In a number system the information is divided into a group of symbols; for example, 26

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

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

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

### Answers to Appendix C Extra Practice Problems

APPENDIX C ANSWERS Answers to Appendix C Extra Practice Problems This document contains the answers and explanations for the problems posed in Appendix C, Extra Practice, of the book. The problems in Appendix

### Chapter II Binary Data Representation

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

### Subnetting on Exams: Another look at solving the math

Subnetting on Exams: Another look at solving the math A Guide for IT professionals preparing for any timed exams dealing with subnetting such as Cisco's CCNA and CompTIA's Network+. By: Robert H. Williams

### Grade 6 Math Circles October 25 & 26, Number Systems and Bases

Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles October 25 & 26, 2016 Number Systems and Bases Numbers are very important. Numbers

### Lecture 1: Digital Systems and Number Systems

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

### NUMBER REPRESENTATIONS IN THE COMPUTER for COSC 120

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

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

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

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

### Arithmetic Circuits Addition, Subtraction, & Multiplication

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

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

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

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

### CSC 1103: Digital Logic. Lecture Six: Data Representation

CSC 1103: Digital Logic Lecture Six: Data Representation Martin Ngobye mngobye@must.ac.ug Mbarara University of Science and Technology MAN (MUST) CSC 1103 1 / 32 Outline 1 Digital Computers 2 Number Systems

### Pre-Algebra Class 3 - Fractions I

Pre-Algebra Class 3 - Fractions I Contents 1 What is a fraction? 1 1.1 Fractions as division............................... 2 2 Representations of fractions 3 2.1 Improper fractions................................

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

### Number Systems! Why Bits (Binary Digits)?!

Number Systems Why Bits (Binary Digits)? Computers are built using digital circuits Inputs and outputs can have only two values True (high voltage) or false (low voltage) Represented as and Can represent

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

1 Basic Computing Concepts (4) Data Representations The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The

### How to count like a computer. 2010, Robert K. Moniot 1

Binary and Hex How to count like a computer 2010, Robert K. Moniot 1 Why Binary? The basic unit of storage in a computer is the bit (binary digit), which can have one of just two values: 0 or 1. This is

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

### Subnetting Examples. There are three types of subnetting examples I will show in this document:

Subnetting Examples There are three types of subnetting examples I will show in this document: 1) Subnetting when given a required number of networks 2) Subnetting when given a required number of clients

### EE 3170 Microcontroller Applications

EE 37 Microcontroller Applications Lecture 3 : Digital Computer Fundamentals - Number Representation (.) Based on slides for ECE37 by Profs. Sloan, Davis, Kieckhafer, Tan, and Cischke Number Representation

### A B C

Data Representation Module 2 CS 272 Sam Houston State University Dr. Tim McGuire Copyright 2001 by Timothy J. McGuire, Ph.D. 1 Positional Number Systems Decimal (base 10) is an example e.g., 435 means

### THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM Eng. Huda M.

THE ISLAMIC UNIVERSITY OF GAZA ENGINEERING FACULTY DEPARTMENT OF COMPUTER ENGINEERING DIGITAL LOGIC DESIGN DISCUSSION ECOM 2012 Eng. Huda M. Dawoud September, 2015 1.1 List the octal and hexadecimal numbers

### Number Systems and Data Representation CS221

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

### Digital Logic. The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer.

Digital Logic 1 Data Representations 1.1 The Binary System The Binary System is a way of writing numbers using only the digits 0 and 1. This is the method used by the (digital) computer. The system we

### CS 245 Assembly Language Programming Intro to Computer Math

Binary-Hexadecimal Worksheet 1 CS 245 Assembly Language Programming Intro to Computer Math Text: Computer Organization and Design, 4 th Ed., D A Patterson, J L Hennessy Section 2.4 Objectives: The Student

### Grade 6 Math Circles October 25 & 26, Number Systems and Bases

Faculty of Mathematics Waterloo, Ontario N2L 3G1 Centre for Education in Mathematics and Computing Grade 6 Math Circles October 25 & 26, 2016 Number Systems and Bases Numbers are very important. Numbers

### 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 CHAPTER 19-1

NUMBER SYSTEMS 19.1 The Decimal System 19. The Binary System 19.3 Converting between Binary and Decimal Integers Fractions 19.4 Hexadecimal Notation 19.5 Key Terms and Problems CHAPTER 19-1 19- CHAPTER

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