Lecture 37 – Practice Exercises 9

Slides:



Advertisements
Similar presentations
How to Convert Decimal Numbers to Binary EXAMPLES.
Advertisements

Base 10 Denary Decimal
ECE 331 – Digital System Design
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
CS 151 Digital Systems Design Lecture 3 More Number Systems.
Introduction to Computing Systems (1st Exam). 1. [10] What is the range of decimal integers that can be represented by the following given numbers of.
Chapter Chapter Goals Know the different types of numbers Describe positional notation.
Assignment 4 Sample problems. Convert the following decimal numbers to binary
Chapter 02 Binary Values and Number Systems Nell Dale & John Lewis.
CISCO NETWORKING ACADEMY Chabot College ELEC 74A Hexadecimal Introduction.
Binary and Hexadecimal Numbers
© by Kenneth H. Rosen, Discrete Mathematics & its Applications, Sixth Edition, Mc Graw-Hill, 2007 Chapter 3 (Part 3): The Fundamentals: Algorithms, the.
CS105 INTRODUCTION TO COMPUTER CONCEPTS BINARY VALUES & NUMBER SYSTEMS Instructor: Cuong (Charlie) Pham.
1 Problem Solving using computers Data.. Representation & storage Representation of Numeric data The Binary System.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Number System. Popular number systems Decimal. (Base 10). The system that we humans are most familiar with. Binary. (Base 2). Octal. (Base 8). Hexadecimal.
Chapter 2 Binary Values and Number Systems. 2 2 Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645,
Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in other bases.
6 October 2015Birkbeck College, U. London1 Introduction to Computer Systems Lecturer: Steve Maybank Department of Computer Science and Information Systems.
Number systems, Operations, and Codes
Number System. Number Systems Important Number systems – Decimal – Binary – Hexadecimal.
Binary Values and Number Systems
CPS120: Introduction to Computer Science Computer Math: Converting to Decimal.
Positional Notation 642 in base 10 positional notation is:
Lecture 2 Binary Values and Number Systems. The number 943 is an example of a number written in positional notation. The relative positions of the digits.
Number System sneha.
Chapter 2 Number Systems: Decimal, Binary, and Hex.
Octal to Decimal Hexadecimal DecimalOctal Binary.
Data Representation Hexadecimal  Although computers work in binary it is sometimes inconvenient for humans to read everything in Binary. For example in.
THE BINARY NUMBER SYSTEM “There are only 10 types of people in this world: Those who understand BINARY and those who do not.”
DECIMALBINARY a) b) c) d) e) f) Revision Exercise DECIMALBINARY a) b) c)
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
Codes Octal Power Hexadecimal ASCII BCD Code
Computer Programming 12 Mr. Jean February 11 th, 2014.
Chapter 2 Binary Values and Number Systems Chapter Goals Distinguish among categories of numbers Describe positional notation Convert numbers in.
Section 3.5 Solving Systems of Linear Equations in Two Variables by the Addition Method.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
The Hexadecimal System is base 16. It is a shorthand method for representing the 8-bit bytes that are stored in the computer system. This system was chosen.
CMSC 1041 Binary / Hex Binary and Hex The number systems of Computer Science.
Base 16 (hexadecimal) Uses the decimal digits and the first letters of the alphabet to encode 4 binary bits (16=2 4 ) abcdef or ABCDEF.
Binary Numbers Practice.
Binary Values. Numbers Natural Numbers Zero and any number obtained by repeatedly adding one to it. Examples: 100, 0, 45645, 32 Negative Numbers.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
Agenda Review:  Relation Properties Lecture Content:  Divisor and Prime Number  Binary, Octal, Hexadecimal Review & Exercise.
Data Representation Covering… Binary addition / subtraction
Binary Values and Number Systems
Topic: Binary Encoding – Part 2
Lecturer: Santokh Singh
Topic: Binary Encoding – Part 1
Chapter 02 Nell Dale & John Lewis.
Octal to Decimal Decimal Octal Binary Hexadecimal.
Location in course textbook
Number System conversions
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
4 Laws of Integral Indices
Number Systems Base 2, 10, 16.
Binary, Octal and Hex Numbers Copyright Thaddeus Konar
There are 10 types of people of people in this world…
Binary Lesson 3 Hexadecimal
Binary Values and Number Systems
Binary Lesson 3 Hexadecimal
Solving Equations involving Decimal Coefficients
Binary Values and Number Systems
Remember the 10 types of people of people in this world…
COMS 161 Introduction to Computing
Binary Values and Number Systems
Lecture 35 – Unit 6 – Under the Hood Binary Encoding – Part 1
Lecture 36 – Unit 6 – Under the Hood Binary Encoding – Part 2
Lecture 37 – Practice Exercises 9
Presentation transcript:

Lecture 37 – Practice Exercises 9 CMPT 120 Lecture 37 – Practice Exercises 9

Question 1 How many distinct numbers can I represent with … 1 bit? What are these numbers? 4 bits? What are these numbers (in binary)? How many distinct numbers can I represent with 7 bits? These numbers range from ______ to _______ How many distinct numbers can I represent with 1 byte? How many distinct numbers can I represent with 32 bits? These numbers range from ______ to _______________

Question 2 – Convert the following numbers Convert 10011011 into an integer (decimal number): a) What is the binary equivalent of 57? b) What is the binary equivalent of 157? a) Express 10011011 as an hexadecimal number: b) Express 1011110 as an hexadecimal number:

Question 3 Translate the following message: 01000111 01101111 01101111 01100100 00100000 01101100 01110101 01100011 01101011 00100000 01101001 01101110 00100000 01111001 01101111 01110101 01110010 00100000 01100110 01101001 01101110 01100001 01101100 00100000 01100101 01111000 01100001 01101101 01110011 00100001 0001010 Answer:

Question 4 Problem Statement Let’s write a binary-decimal converter in Python How would we go about solving this problem? Algorithm:

Question 5 Problem Statement Write two Python functions to find the minimum number in a list The first function must compare each number to every other number on the list It complexity must be O(n2) The second function must be linear O(n)