Chapter 2 Exercises and Answers

Similar documents
Digital Logic Design Exercises. Assignment 1

CS & IT Conversions. Magnitude 10,000 1,

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

Positional notation Ch Conversions between Decimal and Binary. /continued. Binary to Decimal

Chapter 2. Binary Values and Number Systems

CMPE223/CMSE222 Digital Logic Design. Positional representation

Chapter 2 Binary Values and Number Systems

Octal and Hexadecimal Integers

Hexadecimal Numbers. Journal: If you were to extend our numbering system to more digits, what digits would you use? Why those?

Number System. Introduction. Decimal Numbers

QUIZ: Generations of computer technology. Hardware:

CMPS 10 Introduction to Computer Science Lecture Notes

QUIZ: Generations of computer technology. Hardware:

Unit 7 Number System and Bases. 7.1 Number System. 7.2 Binary Numbers. 7.3 Adding and Subtracting Binary Numbers. 7.4 Multiplying Binary Numbers

Digital Fundamentals. CHAPTER 2 Number Systems, Operations, and Codes

SCHOOL OF ENGINEERING & BUILT ENVIRONMENT. Mathematics. Numbers & Number Systems

Number representations

Number Systems CHAPTER Positional Number Systems

EE292: Fundamentals of ECE

Introduction to Computer Science-103. Midterm

Moodle WILLINGDON COLLEGE SANGLI. ELECTRONICS (B. Sc.-I) Introduction to Number System

Introduction to Numbering Systems

Lecture (01) Digital Systems and Binary Numbers By: Dr. Ahmed ElShafee

Pick any positive integer. If the integer is even, divide it by 2. If it is odd,

Values, Variables, Types & Arithmetic Expressions. Agenda

COE 202: Digital Logic Design Number Systems Part 2. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Decimal Binary Conversion Decimal Binary Place Value = 13 (Base 10) becomes = 1101 (Base 2).

Number Systems and Binary Arithmetic. Quantitative Analysis II Professor Bob Orr

Chapter 1 Emad Felemban

Review of Data Representation & Binary Operations Dhananjai M. Rao CSA Department Miami University

Algebra 1 Review. Properties of Real Numbers. Algebraic Expressions

Python Numbers. Learning Outcomes 9/19/2012. CMSC 201 Fall 2012 Instructor: John Park Lecture Section 01 Discussion Sections 02-08, 16, 17

Operations On Data CHAPTER 4. (Solutions to Odd-Numbered Problems) Review Questions

Digital Fundamentals

Exponential Notation

Module 1: Information Representation I -- Number Systems

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

DIGITAL SYSTEM DESIGN

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

Odd-Numbered Answers to Exercise Set 1.1: Numbers

COE 202- Digital Logic. Number Systems II. Dr. Abdulaziz Y. Barnawi COE Department KFUPM. January 23, Abdulaziz Barnawi. COE 202 Logic Design

Chapter 2: Number Systems

Number Systems. Both numbers are positive

in this web service Cambridge University Press

Level ISA3: Information Representation

What Is It? Instruction Register Address Register Data Register

Octal & Hexadecimal Number Systems. Digital Electronics

Lecture (01) Introduction Number Systems and Conversion (1)

TOPIC: NUMBER SYSTEMS

Machine Architecture and Number Systems

Binary Values and Number Systems

Computer Number Systems Supplement

Appendix. Numbering Systems. In This Appendix...

Digital Systems and Binary Numbers

Applied Computer Programming

Unit 2: Accentuate the Negative Name:

Number System. Introduction. Natural Numbers (N) Whole Numbers (W) Integers (Z) Prime Numbers (P) Face Value. Place Value

1.3 Systems of numeration: To represent quantities in the different systems of numeration, specific symbols are used, which are also called ciphers.

Data Representation and Binary Arithmetic. Lecture 2

Chapter 1 Review of Number Systems

Conversion Between Number Bases

Number Bases LESSON TWO. Computer Science. By John Owen

Chapter 1 Preliminaries

UNIT1: COMPUTERNUMBER SYSTEM

Fundamentals of Programming (C)

User. Application program. Interfaces. Operating system. Hardware

Objectives. Connecting with Computer Science 2

Lesson Plan. Preparation

MC1601 Computer Organization

CHAPTER 2 Number Systems

CHAPTER V NUMBER SYSTEMS AND ARITHMETIC

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Machine Architecture and Number Systems CMSC104. Von Neumann Machine. Major Computer Components. Schematic Diagram of a Computer. First Computer?

Dec Hex Bin ORG ; ZERO. Introduction To Computing

2 Number Systems 2.1. Foundations of Computer Science Cengage Learning

Beyond Base 10: Non-decimal Based Number Systems

Chapter 2 Bits, Data Types, and Operations

Numbering systems. Dr Abu Arqoub

Chapter 2 Bits, Data Types, and Operations

6. Binary and Hexadecimal

Electronic Data and Instructions

Digital Computers and Machine Representation of Data

Programming Concepts and Skills. ASCII and other codes

Chapter 2. Positional number systems. 2.1 Signed number representations Signed magnitude

MYcsvtu Notes DATA REPRESENTATION. Data Types. Complements. Fixed Point Representations. Floating Point Representations. Other Binary Codes

Logic and Computer Design Fundamentals. Chapter 1 Digital Computers and Information

Computer Sc. & IT. Digital Logic. Computer Sciencee & Information Technology. 20 Rank under AIR 100. Postal Correspondence

REVIEW. The C++ Programming Language. CS 151 Review #2

Number Systems. Dr. Tarek A. Tutunji Philadelphia University, Jordan

Excerpt from "Art of Problem Solving Volume 1: the Basics" 2014 AoPS Inc.

Introduction to Informatics

COMP Overview of Tutorial #2

MACHINE LEVEL REPRESENTATION OF DATA

Chapter 4 Section 2 Operations on Decimals

T02 Tutorial Slides for Week 2

Chapter 4: Computer Codes. In this chapter you will learn about:

Chapter 2 Bits, Data Types, and Operations

CHW 261: Logic Design

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Lecture 1: What is a computer?

Transcription:

Chapter 2 Exercises and nswers nswers are in blue. For Exercises -5, match the following numbers with their definition.. Number. Natural number C. Integer number D. Negative number E. Rational number unit of an abstract mathematical system subject to the laws of arithmetic. natural number, a negative of a natural number, or zero. C The number zero and any number obtained by repeatedly adding one to it. n integer or the quotient of two integers (division by zero excluded). E value less than zero, with a sign opposite to its positive counterpart. D For Exercises 5-, match the solution with the problem. (binary + addition) 0 0 000+ (binary addition) 00 C + (binary addition) (binary subtraction) F 00 (binary subtraction) D 000 (binary subtraction) E For Exercises 2-7, mark the answers true and false as follows:. True. False inary numbers are important in computing because a binary number can be converted into every other base. inary numbers can be read off in hexadecimal but not in octal. Starting from left to right, every grouping of four binary digits can be read as one hexadecimal digit. byte is made up of six binary digits. Two hexadecimal digits can be stored in one byte. Reading octal digits off as binary produces the same result whether read from right to left as left to right.

Exercises 8-45 are problems or short answer questions. Distinguish between a natural number and a negative number. natural number is 0 and any number that can be obtained by repeatedly adding to it. negative number is less than 0, and opposite in sign to a natural number. lthough we usually do not consider negative 0. Distinguish between a natural number and a number. number is an integer or the quotient of integer numbers. (Division by 0 is excluded.) natural number is 0 and the positive integers. (See also definition in answer to Exercise.) Label the following numbers natural, negative, or. a..333333 b. /3 negative, c. 066 natural d. 2/5 e. 6.2 f. π (pi) not any listed If 89 is a number in each of the following bases, how many s are there? a. base 0 89 b. base 8 Can't be a number in base 8, c. base 2 26 d. base 3 470 e. base 6 293 Express 89 as a polynomial in each of the bases in Exercise. 8 * 0 2 + 9 * 0 + Can't be shown as a polynomial in base 8. 8 * 2 2 + 9 * 2 + 8 * 3 2 + 9 * 3 + 8 * 6 2 + 9 * 6 + Convert the following numbers from the base shown to base 0. a. (base 2) 7 b. 777 (base 8) 5 c. FEC (base 6) 4076 d. 777 (base 6) 9 e. (base 8) 73 Explain how base 2 and base 8 are related. ecause 8 is a power of 2, base-8 digits can be read off in binary and 3 base-2 digits can be read off in octal. Explain how base 8 and base 6 are related. 8 and 6 are both powers of two.

Expand Table 2. to include the numbers from 0 through 6. binary octal decimal 0 3 3 00 4 4 0 5 5 0 6 6 7 7 Expand the table in Exercise 26 to include hexadecimal numbers. binary octal decimal hexadecimal 0 3 3 3 00 4 4 4 0 5 5 5 0 6 6 6 7 7 7 Convert the following binary numbers to octal. Convert the following binary numbers to hexadecimal. Convert the following hexadecimal numbers to octal. a. 9 25 b. E7 347 C. 6E 56 Convert the following octal numbers to hexadecimal. a. 777 FF b. 605 85 c. 443 23 d. 52 5 e. Convert the following decimal numbers to octal. a. 90 605 b. 32 50 c. 492 2724 d. 066 2052 e. 200 372 Convert the following decimal numbers to binary. a. 45 00 b. 69 0000 c. 066 0000000 d. 99 000

e. Convert the following decimal numbers to hexadecimal. a. 066 42 b. 939 793 c. d. 998 3E6 e. 43 2 If you were going to represent numbers in base 8, what symbols might you use to represent the decimal numbers 0 through 7 other than letters? ny special characters would work or characters from another alphabet. Let's use # for 6 and @ for 7. Convert the following decimal numbers to base 8 using the symbols you suggested in Exercise 5. a. 066 354 b. 99099 #@F9 c. Perform the following octal additions a. 770 + 665 655 b. 0 + 707 00 c. 202 + 667 07 Perform the following hexadecimal additions a. 96 + 43 9F9 b. E9 + F F8 c. 066 + CD C33 Perform the following octal subtractions. a. 066 776 70 b. 234 765 247 c. 7766 5544 2222 Perform the following hexadecimal subtractions. a. C 9 b. 9988 98DD c. 9F8 492 9566 Why are binary numbers important in computing? Data and instructions are represented in binary inside the computer. byte contains how many bits? 8

How many bytes are there in a 64-bit machine? 8 Why do microprocessors such as pagers have only 8-bit machines? Pagers are not general-purpose computers. The programs in pagers are small enough to be represented in 8-bit machines. Why is important to study how to manipulate fixed-sized numbers? It is important to understand how to manipulate fixed-sized numbers because numbers are represented in a computer in fixed-sized format. How many ones are there in the number 98 in base 3? ((3*3*3*0) + (3*3*) + 3*9) + 8) = 23954 Describe how a bi-quinary number representation works. There are seven lights to represent ten numbers. The first two determine the meaning of the next five. If the first light is on, the next five represent 0,, 2, 3, and 4 respectively. If the second is on, the next five represent 5, 6, 7, 8, and 9 respectively.