Discussion. Why do we use Base 10?

Similar documents
Worksheet - Storing Data

计算机信息表达. Information Representation 刘志磊天津大学智能与计算学部

Using sticks to count was a great idea for its time. And using symbols instead of real sticks was much better.

Lecture 1: What is a computer?

Bits, bytes, binary numbers, and the representation of information

Module 1: Information Representation I -- Number Systems

CMSC 1513 Lecture 1.2

[301] Bits and Memory. Tyler Caraza-Harter

Bits and Bit Patterns

REPRESENTING INFORMATION:

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

Information Science 1

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

CMSC 104 -Lecture 2 John Y. Park, adapted by C Grasso

The type of all data used in a C++ program must be specified

CC411: Introduction To Microprocessors

IT 1204 Section 2.0. Data Representation and Arithmetic. 2009, University of Colombo School of Computing 1

Example 1: Denary = 1. Answer: Binary = (1 * 1) = 1. Example 2: Denary = 3. Answer: Binary = (1 * 1) + (2 * 1) = 3

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Intermediate Programming & Design (C++) Notation

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

Data Representation. Types of data: Numbers Text Audio Images & Graphics Video

HARDWARE AND OPERATING SYSTEMS

FA269 - DIGITAL MEDIA AND CULTURE

Sahalsoftware college. Welcome To understanding Basic Computer Concept

An Overview of the Computer System. Kafui A. Prebbie 24

The type of all data used in a C (or C++) program must be specified

COMP 102: Computers and Computing

Information Communications Technology (CE-ICT) 6 th Class

umber Systems bit nibble byte word binary decimal

The x86 Microprocessors. Introduction. The 80x86 Microprocessors. 1.1 Assembly Language

INTRODUCTION TO COMPUTERS

Parts are adapted from Windows 98 by Mark Twain Media, Inc. A Computer System has Hardware and Software

Teaching KS3 Computing. Session 3 Theory: More on binary and representing text Practical: Introducing IF

Data Representation 1

CS 105 Review Questions #3

Electronic Data and Instructions

Jianhui Zhang, Ph.D., Associate Prof. College of Computer Science and Technology, Hangzhou Dianzi Univ.

Chapter Two. Hardware Basics: Inside the Box

Introduction to Computers. Joslyn A. Smith

Chapter 1: Why Program? Computers and Programming. Why Program?

Memory Addressing, Binary, and Hexadecimal Review

System Unit Components Chapter2

Introduction to computers

Binary Codes. Dr. Mudathir A. Fagiri

User. Application program. Interfaces. Operating system. Hardware

For this class we are going to create a file in Microsoft Word. Open Word on the desktop.

Computer Number Systems Supplement

CSC 170 Introduction to Computers and Their Applications. Lecture #1 Digital Basics. Data Representation

Chapter 4 The Components of the System Unit

Homeschool Enrichment. The System Unit: Processing & Memory

What is the typical configuration of a computer sold today? 1-1

Experimental Methods I

What is Data Storage?

Objectives. Connecting with Computer Science 2

Notes from April 3 Tuesday

Management Information Systems OUTLINE OBJECTIVES. Information Systems: Computer Hardware. Dr. Shankar Sundaresan

General Computing Concepts. Coding and Representation. General Computing Concepts. Computing Concepts: Review

Unit - II. Computer Concepts and C Programming 06CCP13. Unit II

CHAPTER 2: HOW DOES THE COMPUTER REALLY WORK

15/09/15. Introduction to Computers & The Internet. Contents. Computer hardware and software. Input and output devices CPU. Memory.

Computers Are Your Future

Computers Are Your Future

Chapter 2. Prepared By: Humeyra Saracoglu

Topic Notes: Bits and Bytes and Numbers

Unit 2 Digital Information. Chapter 1 Study Guide

So computers can't think in the same way that people do. But what they do, they do excellently well and very, very fast.

IBM 370 Basic Data Types

CS 101 Representing Information. Lecture 5

OCR J276 GCSE Computer Science

Terminology, Types of Computers & Computer Hardware

Day 3. Storage Devices + Types of Memory + Measuring Memory + Computer Performance

Electricity: Voltage. Gate: A signal enters the gate at a certain voltage. The gate performs operations on it, and sends it out was a new signal.

What is a computer? Units of Measurement. - A machine that: - Counts.

COMP 273 Winter physical vs. virtual mem Mar. 15, 2012

Topic Notes: Bits and Bytes and Numbers

Analogue vs. Discrete data

Chapter 4 The Components of the System Unit

Introduction To Computer Hardware

Beyond Base 10: Non-decimal Based Number Systems

CMPS 10 Introduction to Computer Science Lecture Notes

Binary, Hexadecimal and Octal number system

Holds data, instructions, and information for future use Storage medium is physical material used for storage

Final Labs and Tutors

Chapter 2. Working with Disks and Other Removable Media

National 5 Computing Science Software Design & Development

Digital Media. Daniel Fuller ITEC 2110

Backing Storage Media

Coding & Computation or What s all this about 1s and 0s? File: coding-computation-slides.tex.

Lesson 1: Computer Concepts

Microprocessors I MICROCOMPUTERS AND MICROPROCESSORS

Computer Basics PC-100

Digital Fundamentals

Defining Computers. Defining Computers. Understanding Essential Computer Concepts

LECTURE 1. Introduction

The Programming Process Summer 2010 Margaret Reid-Miller

15110 PRINCIPLES OF COMPUTING SAMPLE EXAM 2

Chapter 3: Number Systems and Codes. Textbook: Petruzella, Frank D., Programmable Logic Controllers. McGraw Hill Companies Inc.

Numeral Systems. -Numeral System -Positional systems -Decimal -Binary -Octal. Subjects:

CHAPTER 2 - DIGITAL DATA REPRESENTATION AND NUMBERING SYSTEMS

Transcription:

MEASURING DATA

Data (the plural of datum) are anything in a form suitable for use with a computer. Whatever a computer receives as an input is data. Data are raw facts without any clear meaning. Computers process data and generate information. All data stored and processed by computers are in the form of whole numbers. The purpose of the numbers becomes clear after they are interpreted and displayed by software.

Go to RGB Explorer

Discussion Why do we use Base 10?

Numbers the Maya used this system.

Numbers Egyptian Number System

Numbers Chinese Number System

Numbers

Decimal and Binary Number Systems Since childhood, we have learned to do our computations using the numbers 0-9, the digits of the decimal number system. In fact, we are so accustomed(used to) to working with decimal numbers that we hardly think about their use.

Considering the widespread use of this system, why should anyone bother to study the binary number system? The answer is found in something that is almost as widespread as decimal numbers: computers.

Every computer processor is made of millions of tiny switches that can be turned off or on. Because these switches have only two states, it makes sense for a computer to perform its computations with a number system that has only two digits: the binary number system. These digits (0 and 1) are called bits and correspond to the off and on positions of the switches in the computer processor. With only these two digits, a computer can perform all the arithmetic that we can with ten digits.

We measure computer information (data) in bits and bytes. Bit is short for binary digit. It is the smallest unit of information that a computer can understand. One bit represents a 1 or 0 digit in a binary numeral or a true or false logical condition. A bit is represented physically by high or low voltage in a circuit or a small magnetized spot on a disk.

Byte is short for binary term. A byte usually contains eight bits. It can represent a single character, such as a letter, a digit, or a punctuation mark. Because a byte represents only a small amount of information, we usually measure amounts of computer memory and storage in kilobytes (one kilobyte is 1024 bytes), megabytes (one megabyte is 1048576 bytes), or gigabytes (one gigabyte is 1073741824 bytes).

Kilobyte KB - about 1 thousand bytes A small email text is about 2 KB A 5 page paper might be 100 KB Text does not take a lot of bytes to store compared to images or video Math: if you have N bytes, that's N/1000 KB e.g. 23,000 bytes is about 23 KB

The Measurement One kilobyte (KB) is a collection of about 1000 bytes. A page of ordinary roman alphabetic text takes about 2 kilobytes to store (about one byte per letter). A typical short email would also take up just 1 or 2 kilobytes. Text is one of the most naturally compact types of data at about one byte required to store each letter. In non-roman alphabets, such as Arabic, the storage takes up 2 or 4 bytes per "letter" which is still pretty compact compared to audio and images.

Megabyte (MB) - about 1 million bytes A MB is about 1000 KB MP3 audio is about 1 megabyte per minute A high quality digital picture is about 2-5 megabytes Math: if you have N KB, that's N/1000 MB

One megabyte is about 1 million bytes (or about 1000 kilobytes). An MP3 audio file of a few minutes or a 10 million pixel image from a digital camera would typically take up few megabytes. A data CD disk stores about 700 MB. The series of bits are represented as spiral path of tiny pits in the silver material in the disk. Imagine that each pit is interpreted as a 0, and the lack of a pit is a 1 as the spiral sequence is read. Fun fact: the whole spiral on a CD is over 5km long.

Math 2,000,000 bytes is about how many MB? 23,000 KB is about how many MB? 500 KB is about how many MB?

Gigabyte GB = about a billion bytes A GB is about 1000 MB Common sized unit modern hardware 4000 MB = 4 GB An ordinary computer in 2014 might have 4-8 GB or RAM A DVD disk has a capacity 4.7GB (single layer) --Figure 2 GB per hour of video (varies greatly) A flash drive might hold 16 GB A hard drive might hold 750 GB Math: if you have N MB, that's N/1000 GB

Math 4,000 MB is about how many GB? 250 MB is about how many GB?

Terabyte or TB One terabyte (TB) is about 1000 gigabytes, or roughly 1 trillion bytes. You can buy 1 TB and 2 TB hard drives today, so we are just beginning the time when this term comes in to common use. Gigabyte used to be a rare term too, until Moore's law made it common.

Kilobyte / Megabyte / Gigabyte Word Problems Alice has 600 MB of data. Bob has 700 MB of data. Will it all fit on Alice's 2 GB thumb drive? Yes it fits: 600 MB + 700 MB is 1300 MB. 1300 MB is 1.3 GB, so it will fit on the 2 GB drive no problem. Equivalently we could say that the 2 GB drive has space for 2000 MB, so the 1300 MB fits.

Alice has 100 small images, each of which is 500 KB. How much space do they take up overall in MB? 100 times 500 KB is 50000 KB, which is 50 MB.

Suppose we have an image which is 800 pixels by 600 pixels. Each pixel has its own red, green, and blue values, each stored in 1 byte. How many bytes are required to store the whole image in RAM? 800 x 600 is 480,000 pixels. Each pixel takes 3 bytes (one byte each for red/green/blue), so 480,000 * 3 is 1,440,000 bytes overall, i.e. about 1.4 MB, which is the space required for the image in RAM. On disk, you will notice that.jpg files takes up much less space than that; this is due to "compression" which is a very effective spacereduction technique for image and audio data - a future topic.

Your ghost hunting group is recording the sound inside a haunted Ishik classroom for 20 hours as MP3 audio files. About how much data will that be, expressed in GB? MP3 audio takes up about 1 MB per minute. 20 hours, 60 minutes/hour, 20 * 60 yields 1200 minutes. So that's about 1200 MB, which is 1.2 GB.

Alternate Terminology: Kibibyte Mebibyte Gibibyte Tebibyte There's this problem with the word "megabyte".. does it mean 1024 * 1024 bytes, i.e. 2^20 which is 1,048,576, or does it mean exactly 1 million. It's just a 5% difference, but marketers tend to prefer the 1 million, interpretation, since it makes their hard drives etc. appear to hold a little bit more. Also, the difference grows larger and larger for the gigabyte and terabyte sizes. In an attempt to fix this, the terms "kibibyte" "mebibyte" "gibibyte" "tebibyte" have been introduced to specifically mean the 1024 based units

Converting a Decimal Number to Its Binary Equivalent To convert a decimal number to its binary equivalent, repeatedly divide the decimal number by 2, the base of the binary system. Division by 2 will either give a remainder of 1 (dividing an odd number) or no remainder (dividing an even number). Collecting the remainders from repeated divisions will give the binary answer.

Consider the decimal number 178. The steps below show how to convert this number to binary using repeated division. Reading remainders from right to left, the final answer is 10110010. Remember that the first division gives the least significant digit of the answer, and the final division gives the most significant digit of the answer. Also, the result of the final division is always 0.

Converting a Binary Number to Its Decimal Equivalent To find the decimal value of a binary number, simply calculate the value of each binary digit and then sum these values. To convert the binary number to decimal, calculate the position value for each binary digit and then sum these values.

Consider the binary number 10110010. The following chart shows how to calculate the position values and sum them up to get the decimal number.

Math What is the greatest decimal number could be represented in a single byte? In a byte there are 8 bits like XXXXXXXX So 11111111 is the greatest number Which is equal to 255.

Math How many different value could be represented in a byte? The numbers from 0 to 255 could be represented in a byte So 256 different value could be represented in a byte.

ASCII Table and Description ASCII stands for American Standard Code for Information Interchange. Computers can only understand numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of some sort.

Math What is the ASCII equivalence of Hi? What is the ASCII equivalence of Bye? What are the characters that is the equivalence of 87 104 121 according to the ASCII table?

Octal Numbers and Hexadecimal Numbers While the binary number system is very important because of its connection with computers, it is not the only number system of importance. Two other number systems frequently seen are octal numbers and hexadecimal numbers. The octal number system is a base-8 number system and uses the digits 0 7 to represent numbers.

The hexadecimal number system is a base-16 number system and uses the digits 0-9 along with the letters A - F to represent numbers. The table below shows a comparison of the first 16 numbers in the binary, octal, decimal, and hexadecimal number systems

There are only 10 types of people in the world: Those who understand binary, and those who don't

Try with Excel