Introduction to Computer Engineering PDF
Document Details
Uploaded by PalatialHummingbird159
Zehra KARAPINAR SENTURK
Tags
Summary
This document introduces computer engineering topics, covering data storage, bits, Boolean operations, gates, and memory organization aspects.
Full Transcript
Introduction to Computer Engineering Assoc. Prof. Dr. Zehra KARAPINAR SENTURK Chapter 1: Data Storage In this section, we will examine the issues related to data storage and data representation in a computer. The data types we will consider are: text, numeric values, images,...
Introduction to Computer Engineering Assoc. Prof. Dr. Zehra KARAPINAR SENTURK Chapter 1: Data Storage In this section, we will examine the issues related to data storage and data representation in a computer. The data types we will consider are: text, numeric values, images, audio and video. Much of the information also relates to areas other than traditional computing, such as digital photography, audio/video recording and rendering, and long-distance communication Bits and Storing Bits Bit: Data is stored in the computer as 1 or 0 strings. Each of these is called a bit. Boolean Operations: The algebra consisting of AND (.), OR (+), NOT (-, ') operations on a set of 0, 1 numbers is called Boolean algebra. Gates: They are the lowest level circuit elements that perform operations on bits in computer systems. Basic Gates: AND, OR, NOT, XOR Boolean Operations Operations that change true/false values are called Boolean Operations in memory of George Boole (1815-1864), the pioneer of the field of mathematics called logic. Gates and Flip-Flops A device that produces the output of a Boolean operation according to the given input values is called a gate. Gates can be manufactured from a variety of technologies such as gears, relays and optical devices. –Often implemented as (small) electronic circuits –Provide the building blocks from which computers are constructed –VLSI (Very Large Scale Integration) Millions of components collected in a chip Flip-Flops The lowest level unit that stores data in a computer is the Flip-Flop. It can only store one bit. They are created by various combinations of gates. Setting the output of flip-flop to 1 Data Storage Units Bit Byte Kilobyte (KB) Megabyte (MB) Gigabyte (GB) Terabyte (TB) Petabyte (PB) Exabyte (EB) Zettabyte (ZB) Yottabyte (YB) Data Transfer Units bps (Bit per second) Kbps, Mbps, Gbps Example: How long does it take to transfer a 1024 MB video file over a 32 Mbps network environment? Data Transfer Units bps (Bit per second) Kbps, Mbps, Gbps Example: How long does it take to transfer a 1024 MB video file over a 32 Mbps network environment? 1024MB/32Mb/s =1024*8/32 s =1024/4 s=256 s Data Processing Units Hz (1/s), kHz, MHz, GHz, … Hertz (Hz): It is the unit of frequency (frequency) in the international unit system. It takes its name from the German physicist Heinrich Rudolf Hertz, who was the first to prove the existence of electromagnetic waves. Hertz refers to the number of revolutions per second. 1 Hertz is defined as one cycle per second, or 1 MHz is defined as one million cycles per second (1,000,000/s). Hexadecimal Notation A long string of bits is often called a stream. To simplify the representation of bit patterns, we often use a shorter notation called hexadecimal notation, taking advantage of having bit patterns in a machine in multiples of four in length. Main Memory For the purpose of storing data, a computer contains a large collection of circuits, each capable of storing only a single bit. This bit store is known as the main memory of the machine. Memory Organization A computer's main memory is organized in manageable units called cells, with a typical cell size of eight bits. An eight-bit string is called a byte. Memory Organization –Although there is no left or right inside the computer, we think of the bits in a memory cell as if they were placed in normal order. –Most significant bit: the bit at the left (high-order) end of the conceptual row of bits in a memory cell –Least significant bit: the bit at the right (low-order) end of the conceptual row of bits in a memory cell Memory Organization To identify specific cells in main memory, each cell is assigned a unique name, called an address. The system is similar to the technique of identifying houses in a city by address. However, in the case of memory cells, the addresses used are purely numeric. All cells are placed in a single line and numbered starting from zero. Memory Terminology Random Access Memory (RAM): Memory in which individual cells can be easily accessed in any order Dynamic Memory (DRAM): RAM composed of volatile memory Measuring Memory Capacity As memories become larger, this terminology has expanded to include MB (megabytes), GB (gigabytes), and TB (terabytes). End-of-chapter questions should be examined. Kilobyte: 210 bytes = 1024 bytes –Example: 3 KB = 3 times1024 bytes Megabyte: 220 bytes = 1,048,576 bytes –Example: 3 MB = 3 times 1,048,576 bytes Gigabyte: 230 bytes = 1,073,741,824 bytes –Example: 3 GB = 3 times 1,073,741,824 bytes Mass Storage Due to the variability and limited size of a computer's main memory, many computers have additional memory devices so-called mass storage (or secondary storage) systems which include magnetic disks, CDs, DVDs, magnetic tapes, flash drives, and hard disk drives-HDD (all of which we'll see later). On-line versus off-line Typically larger than main memory Typically less volatile than main memory Typically slower than main memory Magnetic Systems For years, magnetic technology has dominated mass storage issue. The best-known example is the magnetic disk or hard disk drive (HDD), which is a thin spinning disk with a magnetic coating used to store data. Mass Storage Systems Magnetic Systems Disk Tape Optical Systems CD DVD Flash Technology Flash Drives Secure Digital (SD) Memory Card Magnetic Disc Optical Systems Another class of mass storage systems implements optical technology. An example of this is the compact disc (CD). Flash Drives A common feature of mass storage systems based on magnetic or optical technology are the physical movements required to store or retrieve data, such as spinning disks, moving read/write heads, and laser beam targeting. This means that data storage and retrieval is slow compared to the speed of electronic circuits. Flash memory technology has the potential to overcome this disadvantage. In a flash memory system, bits are stored by sending electronic signals directly to the storage medium, caused by the compression of electrons in small chambers of silicon dioxide, thereby changing the properties of small electronic circuits. Perfect for portable, permanent data storage. Data Representation as Bit Patterns Text Representation: Data in a text structure is normally represented by a code where each different symbol in the text (such as letters of the alphabet and punctuation marks) is assigned to a single bit pattern. «Hello.» message in ASCII or UTF-8 coding: ASCII : American Standard Code for Information Interchange Representing Numeric Values Data storage in terms of encoded characters is not efficient when the recorded data is purely numeric. Example: The problem of storing the number 25. If we encode with ASCII symbols using 1 byte per symbol we need 16 bits. We can also store 99 at most using 16 bits. However, as we will see shortly, we can store integers from 0 to 65535 with these 16 bits, using binary notation. Therefore, binary notation (or variations thereof) is widely used for encoded numerical data for storage in the computer. Binary notation is a way of representing numeric values using only the digits 0 and 1 instead of the traditional decimal or base 10 numerals 0, 1, 2, 3, 4, 5, 6, 7, 8, and 9. Representing Numeric Values Limitations of computer representations of numeric values Overflow: occurs when a value is too big to be represented Truncation: occurs when a value cannot be represented accurately Representing Images Representing an image means interpreting the image as a collection of dots called as a pixel (abbreviation for the "picture element"). Representing Sound The most common method of encoding sound data for computer storage and processing is to sample the amplitude of the sound wave at regular intervals and record the obtained values. The sound wave represented by the sequence 0, 1.5, 2.0, 1.5, 2.0, 3.0, 4.0, 3.0, 0 Binary Notation Binary System In binary representation, the position of each digit is also associated with a magnitude that is twice the magnitude of the position to its right. The traditional decimal system is based on powers of ten. The binary system is based on powers of two. Decoding the binary representation 100101 An algorithm for finding the binary representation of a positive integer Applying the algorithm to obtain the binary representation of thirteen Binary Addition Binary addition rules: Example: 111010 + 11011 =? Binary Addition Example: 111010 + 11011 =? Binary Addition Example: 111010 + 11011 =? Answer: 1010101