Document Details

CongratulatoryNephrite3972

Uploaded by CongratulatoryNephrite3972

Lehman College, CUNY

2018

Tags

binary data storage computer science digital information

Summary

This presentation discusses how data is stored in computers using binary numbers. It covers the conversion of integers, different types of data like images and music, the concept of bytes and bits, and encoding schemes. This document also includes questions for readers to answer.

Full Transcript

Do Now All data that is stored in a computer is converted to a sequence of 0s and 1s. Given this fact, how does the computer store integers? Imagine that you live in a world where the only numbers are 0 and 1. How would you write down the quantity 23? HW#2: Worksheet (Textbook p. 25-26 #’s 10-18 and...

Do Now All data that is stored in a computer is converted to a sequence of 0s and 1s. Given this fact, how does the computer store integers? Imagine that you live in a world where the only numbers are 0 and 1. How would you write down the quantity 23? HW#2: Worksheet (Textbook p. 25-26 #’s 10-18 and p. 28-29 #’s 4-6) Copyright © 2018 Pearson Education, Inc. Intro to Binary YouTube video on binary: https://www.youtube.com/watch?v=lnC7h6fg glU Ex: Determine the decimal (base 10) value of the binary number 10011101. Copyright © 2018 Pearson Education, Inc. Intro to Binary (cont.) https://www.youtube.com/watch?v=LpuPe81 bc2w&t=233s The computer uses ‘encoding schemes’ to convert all of this data into strings of 0s and 1s. And when we talk about how much memory we have on our computer or on a flash drive, we are talking about how many 0s and 1s we can store. Copyright © 2018 Pearson Education, Inc. How Computers Store Data All data in a computer is stored in sequences of 0s and 1s Byte: just enough memory to store letter or small number Divided into eight bits Bit: electrical component that can hold positive or negative charge, like on/off switch The on/off pattern of bits in a byte represents data stored in the byte Copyright © 2018 Pearson Education, Inc. How Computers Store Data (cont.) What is the largest number we can store in a byte? Copyright © 2018 Pearson Education, Inc. Storing Numbers Bit represents two values, 0 and 1 Computers use binary numbering system Position of digit j is assigned the value 2j-1 To determine value of binary number sum position values of the 1s Byte size limits are 0 and 255 0 = all bits off; 255 = all bits on To store larger number, use several bytes Copyright © 2018 Pearson Education, Inc. Storing Numbers (cont.) https://www.youtube.com/watch?v=HRmfXA4E UBs Copyright © 2018 Pearson Education, Inc. Storing Characters Data stored in computer must be stored as binary number Characters are converted to numeric code, numeric code stored in memory Most important coding scheme is ASCII ASCII is limited: defines codes for only 128 characters Unicode coding scheme becoming standard Compatible with ASCII Can represent characters for other languages Copyright © 2018 Pearson Education, Inc. Advanced Number Storage To store negative numbers and real numbers, computers use binary numbering and encoding schemes Negative numbers encoded using two’s complement Real numbers encoded using floating-point notation Copyright © 2018 Pearson Education, Inc. Other Types of Data Digital: describes any device that stores data as binary numbers Digital images are composed of pixels To store images, each pixel is converted to a binary number representing the pixel’s color Digital music is composed of sections called samples To store music, each sample is converted to a binary number Copyright © 2018 Pearson Education, Inc.

Use Quizgecko on...
Browser
Browser