Anda di halaman 1dari 41

Computer Programming

Computer

Science: An Overview, 10th Edition By J. Glenn Brookshear C for Engineers & Scientists, An Interpretive Approach, by Harry Cheng Beginning C++, the complete language, by Ivor Horton, Wrox Publishers. How to Program in C++, Dietel and Dietel.

1-2

Week

1-5 ITC Week 5- 16 Programming C++ Week 9 Mid-Term exam

1-3

Assignments

= 20% Quizzes= 20% Midterm = 20% Final = 40% 1 Bonus Point will be awarded to students who have zero absentees by the end of course

1-4

Lectures

and Assignments
of Assignments

\\dataserver\jinnah$ \\dataserver\assignments$

Submission

1-5

Name:

Ms Maryam Kausar Room # 113 Block A Email: maryam.kausar@jinnah.edu.pk

1-6

Lecture 4

Bits and their storage Main Memory Mass Storage

Bit:

Binary Digit (0 or 1) Bit Patterns are used to represent information.


Numbers Text characters Images Sound And others

1-8

Boolean

Operation: An operation that manipulates one or more true/false values Specific operations

AND OR XOR (exclusive or) NOT

1-9

1-10

Gate:

A device that computes a Boolean operation


Often implemented as (small) electronic circuits Provide the building blocks from which computers are constructed VLSI (Very Large Scale Integration)

1-11

1-12

Flip-flop:

A circuit built from gates that can store

one bit.

One input line is used to set its stored value to 1 One input line is used to set its stored value to 0 While both input lines are 0, the most recently stored value is preserved

1-13

1-14

1-15

1-16

1-17

1-18

Hexadecimal

notation: A shorthand notation for long bit patterns


Divides a pattern into groups of four bits each Represents each group by a single symbol

Example:

10100011 becomes A3

1-19

1-20

Cell:

A unit of main memory (typically 8 bits which is one byte)


Most significant bit: the bit at the left (highorder) end of the conceptual row of bits in a memory cell Least significant bit: the bit at the right (loworder) end of the conceptual row of bits in a memory cell

1-21

1-22

Address:

A name that uniquely identifies one cell in the computers main memory

The names are actually numbers. These numbers are assigned consecutively starting at zero. Numbering the cells in this manner associates an order with the memory cells.

1-23

1-24

Random

Access Memory (RAM): Memory in which individual cells can be easily accessed in any order Dynamic Memory (DRAM): RAM composed of volatile memory

1-25

Kilobyte:

210 bytes = 1024 bytes


220 bytes = 1,048,576 bytes

Example: 3 KB = 3 times1024 bytes Sometimes kibi rather than kilo

Megabyte:

Example: 3 MB = 3 times 1,048,576 bytes Sometimes megi rather than mega

Gigabyte:

bytes

230 bytes = 1,073,741,824

Example: 3 GB = 3 times 1,073,741,824 bytes Sometimes gigi rather than giga

1-26

On-line

versus off-line

On-line means that the device or information is connected and readily available to the machine without human intervention. Off-line human intervention is required to either turn on or the medium holding the information needs to be inserted.

Typically

larger than main memory Typically less volatile than main memory Typically slower than main memory

1-27

Magnetic

Systems

Disk Tape

Optical

Systems

CD DVD

Flash

Drives

1-28

For

years magnetic technology has dominated the mass storage arena. Most common examples of magnetic systems are:

Magnetic disk Magnetic tape

1-29

Magnetic

disk:

Thin spinning disk with magnetic coating is used to store data. Read/write heads are placed above and/or below the disk. Each head traverses a circle is called a track. Each track is than divided into small arcs called sectors on which information is recorded.

1-30

1-31

Several

measurements are used to evaluate a disk systems performance:


Seek time: the time required to move the read/write heads from one track to another. Rotation delay or latency time: half the time required for a disk to complete its rotation Access time: the sum of seek time and rotation delay. Transfer rate: the rate at which data can be transferred to or from the disk.

1-32

Magnetic

tape:

Information is recorded on the magnetic coating of a thin plastic tape that is wound on a reel for storage. To access data the tape is mounted in a device called a tape drive. It typically can read, write and rewind the tape under control of the computer. Major disadvantage is the moving between different positions on a tape as it can be very time consuming.

1-33

1-34

Another

class of mass storage system applies optical technology. Common examples are:

Compact Disk(CD) Digital Versatile Disk(DVD)

1-35

CD:

12 cm in diameter and consists of reflective material covered with a clear protective coating. Information is recorded on them by creating variations in their reflective surfaces. CD technology originally applied to audio recording using a recording format known as CDDA(compact disk-digital audio).

1-36

1-37

Traditional

CD have capacities in range of 600-700MB. DVDs which are constructed from multiple semi-transparent layers that serve as distinct surfaces provide larger storage capacities of several GB. Similarly BDs(Blu-ray Disks) provides 5times the capacity of DVD.

1-38

In

flash drive system, bits are stored by sending electronic signals directly to the storage medium. Where they cause electrons to be trapped in tiny chambers of silicon dioxide. Since these chambers are able to hold their captive electrons for many years , this technology is suitable for off-line storage of data.

1-39

File:

A unit of data stored in mass storage system


Fields and keyfields

Physical

record versus Logical record Buffer: A memory area used for the temporary storage of data (usually as a step in transferring the data)

1-40

1-41

Anda mungkin juga menyukai