Unit 2: Data Storage CS 101, Fall 2018

Similar documents
Unit 10: Data Structures CS 101, Fall 2018

Unit 5: Computer Networking CS 101, Fall 2018

Unit 8: Programming Languages CS 101, Fall 2018

Unit 7: Algorithms and Python CS 101, Fall 2018

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two Solutions 26 February 2014

Unit 11: Database Systems CS 101, Fall 2018

Binary Values. CSE 410 Lecture 02

How a Digital Binary Adder Operates

Slide Set 1. for ENEL 339 Fall 2014 Lecture Section 02. Steve Norman, PhD, PEng

CS 31: Intro to Systems Binary Representation. Kevin Webb Swarthmore College January 27, 2015

ECE 2020B Fundamentals of Digital Design Spring problems, 6 pages Exam Two 26 February 2014

CS 31: Intro to Systems Binary Representation. Kevin Webb Swarthmore College September 6, 2018

Inf2C - Computer Systems Lecture 2 Data Representation

Information Science 1

Recap from Last Time. CSE 2021: Computer Organization. It s All about Numbers! 5/12/2011. Text Pictures Video clips Audio

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2 Fall 2018

Chapter 1. Data Storage Pearson Addison-Wesley. All rights reserved

Binary Representations and Arithmetic

UNCA CSCI 255 Exam 1 Spring February, This is a closed book and closed notes exam. It is to be turned in by 1:45 PM.

Bits and Bit Patterns

This podcast will demonstrate a logical approach as to how a computer adds through logical gates.

CprE 281: Digital Logic

60-265: Winter ANSWERS Exercise 4 Combinational Circuit Design

Binary Arithmetic CS 64: Computer Organization and Design Logic Lecture #2

ECE 2030B 1:00pm Computer Engineering Spring problems, 5 pages Exam Two 10 March 2010

1. Which of the following Boolean operations produces the output 1 for the fewest number of input patterns?

Data Storage. Slides derived from those available on the web site of the book: Computer Science: An Overview, 11 th Edition, by J.

CSC 101: Lab Manual#9 Machine Language and the CPU (largely based on the work of Prof. William Turkett) Lab due date: 5:00pm, day after lab session

Slide Set 1. for ENEL 353 Fall Steve Norman, PhD, PEng. Electrical & Computer Engineering Schulich School of Engineering University of Calgary

THE LOGIC OF COMPOUND STATEMENTS

CSC 101: Lab #5 Prelab Boolean Logic Practice Due Date: 5:00pm, day after lab session

10.1. Unit 10. Signed Representation Systems Binary Arithmetic

Binary Arithmetic Intro to Assembly Language CS 64: Computer Organization and Design Logic Lecture #3

Slide Set 5. for ENCM 369 Winter 2014 Lecture Section 01. Steve Norman, PhD, PEng

mith College Computer Science CSC231-Assembly Week #1 Fall 2018 Dominique Thiébaut

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-278: Digital Logic Design Fall Notes - Unit 4. hundreds.

ELECTRICAL AND COMPUTER ENGINEERING DEPARTMENT, OAKLAND UNIVERSITY ECE-2700: Digital Logic Design Winter Notes - Unit 4. hundreds.

CARLETON UNIVERSITY. Laboratory 2.0

CS101 Lecture 04: Binary Arithmetic

Binary Arithmetic. Daniel Sanchez Computer Science & Artificial Intelligence Lab M.I.T.

Course Schedule. CS 221 Computer Architecture. Week 3: Plan. I. Hexadecimals and Character Representations. Hexadecimal Representation

ECE 2030D Computer Engineering Spring problems, 5 pages Exam Two 8 March 2012

NUMERIC SYSTEMS USED IN NETWORKING

E40M. Binary Numbers, Codes. M. Horowitz, J. Plummer, R. Howe 1

Binary Adders: Half Adders and Full Adders

CO Computer Architecture and Programming Languages CAPL. Lecture 9

T02 Tutorial Slides for Week 2

CS 261 Fall Mike Lam, Professor. Combinational Circuits

4. Write a sum-of-products representation of the following circuit. Y = (A + B + C) (A + B + C)

Computer Architecture and System Software Lecture 02: Overview of Computer Systems & Start of Chapter 2

ENCM 369 Winter 2019 Lab 6 for the Week of February 25

Microcomputers. Outline. Number Systems and Digital Logic Review

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

Chapter 2: Universal Building Blocks. CS105: Great Insights in Computer Science

CS 107 Lecture 2: Bits and Bytes (continued)

Lecture 6: Signed Numbers & Arithmetic Circuits. BCD (Binary Coded Decimal) Points Addressed in this Lecture

Digital Fundamentals

Lecture (03) Binary Codes Registers and Logic Gates

REPRESENTING INFORMATION:

Outline. policies. with some potential answers... MCS 260 Lecture 19 Introduction to Computer Science Jan Verschelde, 24 February 2016

Introduction to Computer Science. Homework 1

Dec Hex Bin ORG ; ZERO. Introduction To Computing

CSCI 2212: Intermediate Programming / C Chapter 15

Under the Hood: Data Representation. Computer Science 104 Lecture 2

Computer Number Systems Supplement

CS 101 Representing Information. Lecture 5

Binary. Hexadecimal BINARY CODED DECIMAL

Unit 1. Digital Representation

Converting between Percents, Decimals, and Fractions

CPS 104 Computer Organization and Programming Lecture-2 : Data representations,

CS 150 Introduction to Computer Science 1. August 31, 2009

Exercise: Using Numbers

Write only as much as necessary. Be brief!

DRAM uses a single capacitor to store and a transistor to select. SRAM typically uses 6 transistors.

Number Systems. Decimal numbers. Binary numbers. Chapter 1 <1> 8's column. 1000's column. 2's column. 4's column

D I G I T A L C I R C U I T S E E

Binary Arithme-c 2 Intro to Assembly CS 64: Computer Organiza-on and Design Logic Lecture #3

CS1800 Discrete Structures Final Version A

Lecture #21 March 31, 2004 Introduction to Gates and Circuits

Name EGR 2131 Lab #6 Number Representation and Arithmetic Circuits

Midterm Exam Review. CS 2420 :: Fall 2016 Molly O'Neil

ECOM 2325 Computer Organization and Assembly Language. Instructor: Ruba A.Salamah INTRODUCTION

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.

ECE2049: Embedded Computing in Engineering Design C Term Spring Lecture #3: Of Integers and Endians (pt. 2)

Beginning C Programming for Engineers

1010 2?= ?= CS 64 Lecture 2 Data Representation. Decimal Numbers: Base 10. Reading: FLD Digits: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9

Fundamentals of Programming Session 2

CMPS 10 Introduction to Computer Science Lecture Notes

Experimental Methods I

CS 202: Introduction to Computation Fall 2010: Exam #1

LING 388: Computers and Language. Lecture 5

UNIVERSITY OF WISCONSIN MADISON

Objectives. Connecting with Computer Science 2

COMP combinational logic 1 Jan. 18, 2016

Introduction to Digital Logic Using Logisim

Admin. ! Assignment 3. ! due Monday at 11:59pm! one small error in 5b (fast division) that s been fixed. ! Midterm next Thursday in-class (10/1)

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

Digital Logic Design Exercises. Assignment 1

Introduction to Computer Science-103. Midterm

CS 241 Data Organization Binary

Transcription:

Unit 2: Data Storage CS 101, Fall 2018 Learning Objectives After completing this unit, you should be able to: Evaluate digital circuits that use AND, OR, XOR, and NOT. Convert binary integers to/from decimal, hexadecimal, ASCII. Identify the highest integer that can be represented with n bits. Implement a half adder, full adder, and 4-bit ripple carry adder. Add 8-bit binary numbers without converting to/from decimal. Describe how RAM is organized (e.g., 8-bit cells, addresses). Describe how hard drives, optical drives, and flash drives work. Textbook Sections 1.1 Bits and Their Storage 1.2 Main Memory 1.3 Mass Storage 1.4 Representing Information as Bit Patterns 1.5 The Binary System Video Lectures Binary and Hex Bless and Logisim How Computer Memory Works How Hard Drives Work Assignments Act02 Bits and Bytes; Chapter 1 Problems Lab02 Logisim Tutorial; Ripple Carry Adder

CS 101 Unit 2: Data Storage Before Wednesday Date Completed FINISH parts 1 and 2 of the Bits and Bytes activity READ textbook 1.1 Bits and Their Storage ANSWER questions 1, 5, and 6 in your notes READ textbook 1.5 The Binary System ANSWER questions 1, 2, and 5 in your notes WATCH video lecture: Binary and Hex WATCH video lecture: Bless and Logisim DO tutorial: Logisim Beginner's Steps 0-4 START Lab11: Logisim ripple carry adder (10 pts) Before Friday Date Completed READ textbook 1.2 Main Memory ANSWER questions 1, 2, and 3 in your notes READ textbook 1.3 Mass Storage ANSWER questions 4, 5, and 6 in your notes READ textbook 1.4 Representing as Bit Patterns ANSWER questions 1, 3, and 7 in your notes WATCH video: How Computer Memory Works WATCH video: How Hard Drives Work START Act02 exercises (complete at least 75%) (10 pts) Before Monday Date Completed COMPARE your Lab02 and Act02 with the solutions in Canvas SUBMIT Quiz02 1st attempt closed: see what you don t know STUDY your notes, ask questions on Piazza, meet with the TAs SUBMIT Quiz02 2nd attempt open: try to get the full 10 points (10 pts)

Activity 2: Bits and Bytes Computer hardware is made up of billions of tiny electronic circuits that use low and high voltages to represent the values 0 and 1. These binary digits, or bits for short, are the building blocks of all digital technology. Model 1 Logic Gates Complete the following tables based on the diagrams. AND OR Inputs Output Inputs Output 0 0 0 0 0 1 0 1 1 0 1 0 1 1 1 1 XOR Inputs Output 0 0 0 1 1 0 1 1 Input 0 1 NOT Output

Questions (10 min) Start time: 1. In the circuit diagrams, what does the color (brightness) of the the lines represent? 2. For each type of gate, describe the circumstances when it will output the value 1. AND: OR: XOR: NOT: 3. As a team, define the following words as they are used in everyday English. logic: gate: 4. Based on your definitions, what do you think a logic gate represents? 5. In the example circuit below, what are the values of A, B, C, D, and E? 6. How would A, B, C, D, and/or E change if the top input were zero?

Model 2 Binary Numbers Each team has four cards that are ordered from the card with the most dots (8) to the card with the least dots (1). The cards represent four binary digits, or in other words, a 4-bit number. Binary Decimal 1 0 1 0 1 0 1 1 1 1 0 0 1 1 1 1 Questions (15 min) Start time: 7. In the table above, write the decimal value for each row by counting the number of dots. a) What is the largest decimal number that can be represented by four bits? b) What is the smallest decimal number that can be represented by four bits? c) How many possible decimal numbers can be represented by four bits?

8. Examine the binary notation below the cards. Explain in a full sentence what a 0 means about the card s dots and what a 1 means. 9. Complete the following table by writing the binary representation of the decimal numbers 0 to 15 using four bits. (And check your answers for #7.) Decimal Binary Hex 0 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 A 11 B 12 C 13 D 14 E 15 F 10. Hexadecimal is shorthand for binary. For example, 0xD5 in hex is 1101 0101. a) What is 0x2E in binary? b) What is 0x74 in binary? c) What is 0xB00 in binary? d) What is 0xFAD in binary?

11. Based on the table in #9, explain why binary is sometimes referred to as base-2, decimal as base-10, and hexadecimal as base-16. 12. Explain the humor: There are only 10 types of people in the world: those who understand binary, and those who don t. 13. Typically computers group 8 bits together at a time (8 bits are also called 1 byte). Fill in the number of dots for the four new cards: 14. What is the largest number that can be represented by: a) five bits? b) six bits? c) seven bits? d) eight bits? e) n bits? 15. Most computers built since the year 2000 have 64-bit processors. Before then, 32-bit processors were the norm. What is the advantage of having more bits? 16. In terms of logic gates and digital circuits, what is the disadvantage of having more bits?

Chapter 1: Data Storage Complete the following Chapter Review Problems on pages 73 77. #1 (what is the output for each?) #5 (what is in memory at the end?) #8 (what is the most significant bit?) #16 and #17 (latency time, access time) #19 and #20 (ASCII in binary and hex) #26 (binary to base 10) divide them up and do 3 each

#27 (base 10 to binary) work on these ones together [Based on #6] What is the largest 8-bit integer? What is the largest 10-bit integer? Describe a quick way to calculate the maximum value for a given number of bits. [Based on #32] Perform each of the following 5-bit additions without converting to/from decimal. Identify each case in which the answer is incorrect because of overflow. 00101 + 01000 11111 + 00001 01111 + 00001 10111 + 11010 11111 + 11111 00111 + 01100