UMBC CMSC 104 – Section 01, Fall 2016 1. UMBC CMSC 104, Section 01 - Fall 2016  Nothing. Enjoy your weekend! 2.

Slides:



Advertisements
Similar presentations
Base Conversion COP Practice Problem  Print a String in reverse order:  For example, if we want to print “HELLO” backwards,  we first print:
Advertisements

John Owen, Rockport Fulton HS
CISCO NETWORKING ACADEMY Chabot College ELEC 74A Hexadecimal Introduction.
Computer Number Systems This presentation will show conversions between binary, decimal, and hexadecimal numbers.
CMSC 104, Version 9/01 1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The.
© Copyright 2012 by Pearson Education, Inc. All Rights Reserved. 1 Number Systems 0, 1 0, 1, 2, 3, 4, 5, 6, 7 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 0, 1, 2, 3,
© Maths Support Service 2007 Binary and Hexadecimal Numbers Next Slide AE98FD AE98FD.
Real Numbers and the Decimal Number System
Number Systems.
Aug CMSC 104, LECT-021 Machine Architecture and Number Systems Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY.
1 Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number System Converting.
Numeration Systems Introduction to Binary, Octal, and Hexadecimal.
Binary Numbers.
DECIMAL BASE Based on power of 10 In the number 2,468 – from right to left -- the 8 represents the ones, the 6 represents the tens, the 4 represents the.
EX_01.1/46 Numeric Systems. EX_01.2/46 Overview Numeric systems – general, Binary numbers, Octal numbers, Hexadecimal system, Data units, ASCII code,
Machine Architecture CMSC 104, Section 4 Richard Chang 1.
Data Representation in Computer Systems. 2 Objectives Understand the fundamentals of numerical data representation and manipulation in digital computers.
CMSC104 Lecture 2 Remember to report to the lab on Wednesday.
Number systems, Operations, and Codes
CMSC 104, Lecture 051 Binary / Hex Binary and Hex The number systems of Computer Science.
Long Division. We are going to try to solve 837 ÷ 27.
Liang, Introduction to Java Programming, Eighth Edition, (c) 2011 Pearson Education, Inc. All rights reserved Number Systems 0, 1 0, 1, 2,
EEL 3801C EEL 3801 Part I Computing Basics. EEL 3801C Data Representation Digital computers are binary in nature. They operate only on 0’s and 1’s. Everything.
Lecture 1: 8/27/2002CS170 Fall CS170 Computer Organization and Architecture I Ayman Abdel-Hamid Department of Computer Science Old Dominion University.
1 Computer Science LESSON 1 on Number Bases. 2 Objective In this lesson you’ll learn about different Number Bases, specifically about those used by the.
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,
Announcement!!! First exam next Thursday (I’m trying to give you a first exam before the drop date) I’ll post a sample exam over the weekend and will try.
Machine Architecture and Number Systems
CMSC Machine Architecture and Number Systems Topics Major Computer Components Bits, Bytes, and Words The Decimal Number System The Binary Number.
Computer Number System
Binary Decimal Hexadecimal
CMSC 104, Section 301, Fall Lecture 03, 9/09/02 Operating Systems and Using Linux Topics Review Number Systems. Go over Homework 1 Solution. CSHC.
Number Systems. Topics  The Decimal Number System  The Binary Number System  Converting from Binary to Decimal  Converting from Decimal to Binary.
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.
Dr. Clincy Slide 1 CS Chapter 2 (Part 1 of 3) Dr. Clincy Professor of CS Ch 2 Appendix pages will not be on the exam – already covered this.
Programmable Logic Controller
Cosc 2150: Computer Organization
Appendix F Number Systems binary 0, 1 0, 1, 2, 3, 4, 5, 6, 7
Computer Architecture and Number Systems
Number Systems and Codes
Binary, Denary, Hexadecimal Conversion Binary Addition
What is a byte? What is it? How would you use it?
Digital Electronics INTRODUCTION ANALOG VS DIGITAL NUMBER SYSTEMS.
Dr. Clincy Professor of CS
Convert Decimal to Binary
Computer Science LESSON 1 on Number Bases.
2.0 COMPUTER SYSTEM 2.2 Number System and Representation
Tools of Web Development 1: Module A: Numbering Systems
Number System conversions
Machine Architecture and Number Systems
Number Systems and Binary Arithmetic
Dr. Clincy Professor of CS
Hexadecimal Conversions
Binary / Hex Binary and Hex The number systems of Computer Science.
Machine Architecture and Number Systems
Objective 1.02 Understand Numbering Systems
Machine Architecture and Number Systems
AP Computer Science LESSON 1 on Number Bases.
Machine Architecture and Number Systems
Machine Architecture and Number Systems
Machine Architecture and Number Systems
John Owen, Rockport Fulton HS
Dividing a whole number to get decimal
Hexadecimal.
Notes from Last Class Office Hours: GL Accounts?
Machine Architecture and Number Systems
CS 111 – Sept. 16 Machine language examples Instruction execution
Presentation transcript:

UMBC CMSC 104 – Section 01, Fall

UMBC CMSC 104, Section 01 - Fall 2016  Nothing. Enjoy your weekend! 2

UMBC CMSC 104, Section 01 - Fall 2016  I want to try something different with this class…  Everyone log off your PC and put away your phones/calculators/electronic devices!  Break out some paper and a pen/pencil  We will be done the slides quickly.  I will put up some conversion “problems” at the end to test your understanding.  We’re all adults here – if you need more help, you can stay. If it “clicks”, you can go.  Don’t be concerned if it doesn’t “click” right away. Stick around. 3

UMBC CMSC 104, Section 01 - Fall  A bit is a single binary digit (a 1 or 0).  A byte is 8 bits  A word is 32 bits or 4 bytes  Long word = 8 bytes = 64 bits  Quad word = 16 bytes = 128 bits  Programming languages use these standard number of bits when organizing data storage and access.

UMBC CMSC 104, Section 01 - Fall  The on and off states of the capacitors in RAM can be thought of as the values 1 and 0, respectively.  Therefore, thinking about how information is stored in RAM requires knowledge of the binary (base 2) number system.  Let’s review the decimal (base 10) number system first.

UMBC CMSC 104, Section 01 - Fall The decimal number system is a positional number system. Example: X = X 10 0 = 1 2 X 10 1 = 20 6 X 10 2 = X 10 3 = 5000

UMBC CMSC 104, Section 01 - Fall 2016  The decimal number system is also known as base 10. The values of the positions are calculated by taking 10 to some power.  Why is the base 10 for decimal numbers?  Because we use 10 digits, the digits 0 through 9. 7

UMBC CMSC 104, Section 01 - Fall 2016  The binary number system is also known as base 2. The values of the positions are calculated by taking 2 to some power.  Why is the base 2 for binary numbers?  Because we use 2 digits, the digits 0 and 1. 8

UMBC CMSC 104, Section 01 - Fall The binary number system is also a positional numbering system. Instead of using ten digits, 0 - 9, the binary system uses only two digits, 0 and 1. Example of a binary number and the values of the positions: ?

UMBC CMSC 104, Section 01 - Fall X 2 0 = X 2 1 = 0 1 X 2 2 = = = 16 1 X 2 3 = = = 32 0 X 2 4 = = = 64 0 X 2 5 = = 81 X 2 6 =

UMBC CMSC 104, Section 01 - Fall Practice conversions: Binary Decimal ?

UMBC CMSC 104, Section 01 - Fall Make a list of the binary place values up to the number being converted. Perform successive divisions by 2, placing the remainder of 0 or 1 in each of the positions from right to left. Continue until the quotient is zero. Example:

UMBC CMSC 104, Section 01 - Fall Practice conversions: Decimal Binary

UMBC CMSC 104, Section 01 - Fall = ? Humans can’t work well with binary numbers; there are too many digits to deal with. Memory addresses and other data can be quite large. Therefore, we sometimes use the hexadecimal number system.

UMBC CMSC 104, Section 01 - Fall  The hexadecimal number system is also known as base 16. The values of the positions are calculated by taking 16 to some power.  Why is the base 16 for hexadecimal numbers ?  Because we use 16 symbols, the digits 0 through 9 and the letters A through F.

UMBC CMSC 104, Section 01 - Fall BinaryDecimalHexadecimal A B C D E F

UMBC CMSC 104, Section 01 - Fall  Example of a hexadecimal number and the values of the positions: 3 C 8 B

UMBC CMSC 104, Section 01 - Fall Binary: Decimal: Hexadecimal: 50A7 16 Notice how the number of digits gets smaller as the base increases.

UMBC CMSC 104, Section 01 - Fall 2016  Because both Hex and Binary are based on powers of two, converting from Binary to Hex (or Hex to Binary) is simple. Binary: Hex F 4 B D 16 19

UMBC CMSC 104, Section 01 - Fall 2016  Same principals as before…  Try converting this hexadecimal value to decimal 3 A F 9. B 16 B X = X 16 0 = 9 F X 16 1 = 240 A X 16 2 = X 16 3 =

UMBC CMSC 104, Section 01 - Fall Make a list of the hex place values up to the number being converted. Perform successive divisions by 16, placing the remainder in each of the positions from right to left. Continue until the quotient is zero. Example: B

UMBC CMSC 104, Section 01 - Fall 2016  The logic we’ve applied goes for any arbitrary number system  What would a base 7 number system look like? X 7 -1 = X 7 0 = 1 2 X 7 1 = 14 6 X 7 2 = X 7 3 =

UMBC CMSC 104, Section 01 - Fall

UMBC CMSC 104, Section 01 - Fall 2016  From Decimal to Binary  19  89  234  From Binary to Decimal   

UMBC CMSC 104, Section 01 - Fall 2016  From Decimal to Binary  19 =  89 =  234 =  From Binary to Decimal  = 29  = 150  =

UMBC CMSC 104, Section 01 - Fall 2016  From Decimal to Hex  116  516  From Hex to Decimal  A7  B0B 26

UMBC CMSC 104, Section 01 - Fall 2016  From Decimal to Hex  116 = 74  516 = 204  From Hex to Decimal  A7 = 167  B0B =

28

UMBC CMSC 104, Section 01 - Fall

UMBC CMSC 104, Section 01 - Fall