Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

SAGUING o Divides a pattern into groups of four bits each

CS111 – INTRODUCTION TO COMPUTING o Represents each group by a single symbol


 10110101 becomes 0xB5
SEPTEMBER 13, 2022
MAIN MEMORY
TOPIC 1: DATA STORAGE
BITS AND THEIR STORAGE  Cell – unit of main memory(typically 8 bits which is one byte)
 Most significant bit: bi at the left(high-order) end
 Bit – binary digit(0 or 1)  Least significant bit: bit at the right(low-order) end
 Bit patterns are used to represent information
MAIN MEMORY ADDRESSES
 Numbers, text characters, images, sound, and others.
 “name” that identifies one cell in the computer’s main memory
BOOLEAN OPERATIONS
o Names are actually numbers
 Operation that manipulates one or more true/false values o Assigned consecutively starting at zero.
 AND, OR, XOR, and NOT o Numbering the cells in this manner associates an order with
the memory cells.
GATES
RANDOM ACCESS MEMORY(RAM)
 A device that computes a Boolean operation
 Small electronic circuits called transistors  Memory in which individual cells can be easily accessed in any order
 Can be constructed from a variety of other technologies DYNAMIC MEMORY(DRAM)
 Provide the building blocks from which computers are constructed
 RAM composed of volatile memory
ADDITIONAL DEVICES:
 Magnetic disks, CDs, DVDs, Magnetic tapes, Flash drives, and Solid-
state drives.
ADVANTAGES OVER MAIN MEMORY
 Less volatile
FLIP-FLOPS  Larger storage capacities
 Circuits built from gates that act as a fundamental unit of computer  Low cost
memory  Can be removed
o One input line is used to set its stored value to 1 MEASURING MEMORY CAPACITY
o One input line is used to set its stored value to 0
o While both input lines are 0, the most recently stored value 1. Kilobyte: 210 bytes = 1024 bytes
is preserved a. 3KB = 3 times 1024 bytes
2. Megabyte: 220 bytes = 1,048,576
HEXADECIMAL NOTATION a. 3MB = 3 times 1,048,576 bytes
 A shorthand notation for long bit patterns 3. Gigabyte: 230 bytes = 1,073,741,824 bytes
a. 3GB = 3 times 1,073,741,824 bytes  Vector techniques
o Represent images with geometric structures
MASS STORAGE o Scalable
1. BANDWIDTH – total amount of bits that can be transferred in a unit o TrueType and PostScript
of time 4. REPRESENTING SOUND
2. LATENCY – total time between the request for data transfer and its  Sampling techniques that record actual audio
arrival o Long-distance telephone: 8000 samples/sec
o CD sound: 44,100 samples/sec
FLASH DRIVES  MIDI stores directions for making sound
 FLASH MEMORY – circuits that traps electrons in tiny silicon dioxide o Used in music synthesizers
chambers o Encodes which instrument, note, and duration
 Repeated erasing slowly damages the media THE BINARY SYSTEM
 Mass storage of choice for: Digital cameras and Smartphones
 SD cards provide GBs of storage BINARY NOTATION

REPRESENTING INFORMATION AS BIT PATTERNS  The traditional decimal system is based on powers of ten.
 Binary system is based on powers of two.
 Information can be encoded as bit patterns
 Systems for encoding information have been established for: Text,
Numeric data, Images, Sound, and other data.
1. REPRESENTING TEXT
 Each character(letter, punctuation, etc.) is assigned a unique bit
pattern.
 ASCII: 7-bits to represent most symbols used in written English text
 ISO: 8 bit extensions to ASCII. Each designed to accommodate a
major language group
 Unicode: up to 21-bits to represent the symbols used in language
worldwide. 16-bits for world’s commonly used languages
2. REPRESENTING NUMERIC VALUES
 Binary notation: uses bits to represent a number in base 2
o All numeric values in a computer are stored in
sequences of 0s and 1s
o Counting from 0 to 8: 0000, 0001, 0010, 0011, 0100,
0101, 0110, 0111, 1000
3. REPRESENTING IMAGES
 Bit map techniques
o Pixel: “picture element” represents one dot
o RGB: Red, Green, and Blue components
o Luminance and chrominance
o Problems with scaling up images
NUMERICAL ANALYSIS
 Study of dealing with problems when computing large values that
require significant accuracy
 The order in which values are added can lead to two different
results
 Adding very small values to very large values can result in errors
STORING INTEGERS
DATA AND PROGRAMMING
TWO’S COMPLEMENT NOTATION
 Programming language is a computer system created to allow
 Two’s complement notation: Most popular means of representing humans to precisely express algorithms using a higher level of
integer values abstraction.
 Excess notation: Another means of representing integer values
GETTING STARTED WITH PYTHON
PROBLEM OF OVERFLOW
 Variables: name values for later use
 There is a limit to the size of values that can be represented in any  Analogous to mathematic variables in algebra
system  Operators and Expressions
 Overflow  Currency Conversion
o occurs when a computation produces a value that falls  Debugging
outside the range of values that can be represented in o Syntax errors
the machine o Semantic errors – Incorrect expressions like
o If the resulting sign bit is incorrect, an overflow has o Runtime errors – Unintentional divide by zero
occurred
DATA COMPRESSION
o 16 bit systems have been upgraded to 32 bit systems
 Lossy versus lossless
FLOATING-POINT NOTATION
 Run-length encoding
 Consists of a sign bit, mantissa field, and an exponent field.  Frequency-dependent encoding (Huffman codes)
 Normalized form: fill the mantissa starting with the left-most 1  Relative encoding
 Dictionary encoding (includes adaptive dictionary encoding such as
TRUNCATION ERRORS LZW encoding)
 Part of the value being stored is lost because the mantissa is not COMPRESSING IMAGES
large enough
 Non-terminating expansions of fractions  GIF: Good for cartoons
o This happens more often with binary notation  JPEG: Good for photographs
o The value of one-tenth cannot be stored exactly binary  TIFF: Good for image archiving
notation
COMPRESSING AUDIO AND VIDEO
o Often these values are converted to integers
 MPEG
o High definition television broadcast
o Video conferencing
 MP3
o Temporal masking
o Frequency masking
COMMUNICATION ERRORS
 Goal: To reduce errors and increase the reliability of computing
equipment
 Parity bits (even versus odd)
 Checkbytes
 Error correcting codes
 Hamming Distance

You might also like