Assignment 4 Sample problems. Convert the following decimal numbers to binary. 8 920.

Slides:



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

Binary Addition Rules Adding Binary Numbers = = 1
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 219 Bell Hall Office hours: M-F 11:00-11:
Assignment 2 Sample problems. Consider the following expression: ((False and not True) or False or (True and not True)) True False.
Homework Hints Algorithms.
True/False. False True Subject May Go Here True / False ? Type correct answer here. Type incorrect answer here.
Negative Numbers Module M3.3 Section 2.4. Negative Numbers Subtract by adding ’s complement Ignore carry.
Mathematics with Binary. Question  Below is a binary string  Which is the least significant bit (LSB)?  Which is the most significant bit (MSB)? 0.
Exercise 2.5 If each number is represented with 5 bits, 7 = in all three systems -7 = (1's complement) = (signed magnitude) = (2's.
DIGITAL SYSTEMS TCE1111 Representation and Arithmetic Operations with Signed Numbers Week 6 and 7 (Lecture 1 of 2)
Decimal to Binary Conversion Press any key to continue…
Decimal Review ,00010,0001, Decimal ~ Base 10 number system 10 different numbers: 0, 1, 2, 3, 4, 5, 6, 7, 8,
Convert Decimal to Floating point number [IEEE 754]
Binary Addition Addition Rules: = = = = = carry 1 1 carry 1 Example 1: Example 2:
Computer Organization & Programming Chapter2 Number Representation and Logic Operations.
1 Week 3: Data Representation: Negative Numbers READING: Chapter 3.
Simple Data Type Representation and conversion of numbers
Lecture 5.
Conversion Between Lengths Positive number pack with leading zeros +18 = = Negative numbers pack with leading ones -18 =
Chapter 7 Arithmetic Operations and Circuits Binary Arithmetic Addition –When the sum exceeds 1, carry a 1 over to the next-more-significant column.
Number Systems Part 2 Numerical Overflow Right and Left Shifts Storage Methods Subtraction Ranges.
Dale & Lewis Chapter 3 Data Representation. Data and computers Everything inside a computer is stored as patterns of 0s and 1s Numbers, text, audio, video,
Number Representation. 10/12/2015CDA31002 Conversion between Representations Now we can represent a quantity in different number representations How can.
Number Systems. Today Decimal Hexadecimal Binary –Unsigned Binary –1’s Complement Binary –2’s Complement Binary.
Lecture 4 Last Lecture –Positional Numbering Systems –Converting Between Bases Today’s Topics –Signed Integer Representation Signed magnitude One’s complement.
Chapter 2: The Logic of Compound Statements 2.5 Application: Number Systems and Circuits for Addition 1 Counting in binary is just like counting in decimal.
Number systems, Operations, and Codes
Positional Number Systems
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 Systems Binary to Decimal Octal to Decimal Hexadecimal to Decimal Binary to Octal Binary to Hexadecimal Two’s Complement.
CSE115: Introduction to Computer Science I Dr. Carl Alphonce 343 Davis Hall
CS 101 – Aug. 31 Interpreting binary  decimal √ Decimal  binary Shorthand ways of expressing binary –Octal –“Hex” Negative numbers.
AEEE2031 Data Representation and Numbering Systems.
By Jariya Phongsai A two's-complement system is a system in which negative numbers are represented by the two's complement of the absolute value; this.
Data Representation in Computer Systems. 2 Signed Integer Representation The conversions we have so far presented have involved only positive numbers.
Addition and Substraction
Binary01.ppt Decimal Decimal: Base 10 means 10 Unique numerical digits ,00010,000 Weight Positions 3,
COMPUTER SCIENCE Data Representation and Machine Concepts Section 1.6 Instructor: Lin Chen Sept 2013.
1 Understand the examples again Overflow –When two positive numbers added together or a negative number subtracted from a positive number yields negative.
Introduction * Binary numbers are represented with a separate sign bit along with the magnitude. * For example, in an 8-bit binary number, the MSB is.
2’s Complement Another system that lets us represent negative numbers
IT1004: Data Representation and Organization Negative number representation.
CMPUT Computer Organization and Architecture I1 CMPUT229 - Fall 2002 Topic1: Numbers, Numbers, and Numbers José Nelson Amaral.
Introduction to Digital Electronics Lecture 2: Number Systems.
In decimal we are quite familiar with placing a “-” sign in front of a number to denote that it is negative The same is true for binary numbers a computer.
Numerical formats What’s the main idea? Want to represent numbers (eg: 45, -12, ) using only bits. We’ve already seen (or you can read in the book)
Binary  Decimal. Review Each binary digit (bit) is a power of 2 Place the bits, multiply, and add Example:
Lecture 2: 8/29/2002CS149D Fall CS149D Elements of Computer Science Ayman Abdel-Hamid Department of Computer Science Old Dominion University Lecture.
Computer Engineering page 1 Integer arithmetic Depends what you mean by “integer”. Assume at 3-bit string. –Then we define: zero = 000 one = 001 Use zero,
Hexadecimal numbers. Announcements Meeting of the Mathematics and Computing Society, Thursday 12:30pm BSC 126 Help available in Math Lab Check homework.
Binary Addition The simplest arithmetic operation in binary is addition. Adding two single-digit binary numbers is relatively simple, using a form of carrying:
Unit I From Fundamentals of Logic Design by Roth and Kinney.
Representing Positive and Negative Numbers
Negative Binary Numbers
Computer Science 210 Computer Organization
Negative Binary Numbers
Binary Addition & Subtraction
Computer Science 210 Computer Organization
1.6) Storing Integer:.
Unit 18: Computational Thinking
How Computers Store Data
Objective - To add and subtract decimals.
Binary  Name: Class: .
Lecture 5 Binary Operation Boolean Logic. Binary Operations Addition Subtraction Multiplication Division.
Addition & Subtraction Addition & Subtraction
靜夜思 床前明月光, 疑是地上霜。 舉頭望明月, 低頭思故鄉。 ~ 李白 李商隱.
Standard form: In standard form?
Lecture 37 – Practice Exercises 9
Lecture 37 – Practice Exercises 9
Presentation transcript:

Assignment 4 Sample problems

Convert the following decimal numbers to binary

Convert the following decimal numbers to binary. 8 => =>

How can we get ? 8 => 8*1= 2 3 => =>512*1+256*1+128*1+16*1+8*1 => =>

Convert the following Binary numbers to Decimal

Convert the following Binary numbers to Decimal => =>307

How can we get ? => 1* *2 4 +1*2 2 = =>1* *2 5 +1* * * 2 0 = 307

Add the following binary numbers. Express your answers in binary =? =?

Add the following binary numbers. Express your answers in binary = =101011

How can we get ? => => => =>

Subtract the following binary numbers. Express your answers in binary =? =?

Subtract the following binary numbers. Express your answers in binary = =10001

How can we get ? => => => =>

Is this statement True or False? If I have an 8-bit system, will result in overflow.

Is this statement True or False? If I have an 8-bit system, will result in overflow. False

How can we get ?   The result is still 8-bit, so the answer is False

Provide the two's complement of the following 8-bit numbers

Provide the two's complement of the following 8-bit numbers => =>

How can we get ? 1: => (invert bits) (add one) => : => (invert bits) (add one) =>

Consider the Christmas lights circuit (with states) described in class. Let these be the expressions for the next states. A: not A B: A and B

Fill in the table with True or False where appropriate. Time Step (sec) ABNew ANew B 0False TrueFalse 1TrueFalse 2 3

Fill in the table with True or False where appropriate. Time Step (sec) ABNew ANew B 0False TrueFalse 1TrueFalse 2 TrueFalse 3TrueFalse

The “period” of a pattern is the number of steps it takes before the pattern repeats. What is the period of this pattern?

2