Computer Logic (2.2.3) Distinction between analogue and discrete processes and quantities. Conversion of analogue quantities to digital form. Using sampling techniques, use of 2-state electronic devices (logic 0 and logic 1) for reliability. Digital Devices A computer system is an electronic (or digital) device. Anything that happens inside the computer system is represented as a series of 1s and 0s. This happens because an electronic device works by using electricity, and electricity can only have two states: ON (1) and OFF (0). This means that anything stored or used on the computer system must be converted to 1s and 0s which is referred to as binary. So, let s consider this example. Assume that you want to record your voice as a digital file on your computer system. Now, your voice is not made up of a series of 1s and 0s but as sound waves (these are analogue signals). So, these analogue signals must be converted to digital before they can be used on the computer system. This can be achieved by using a microphone. The microphone receives the sound waves (analogue signals) and converts them into binary (digital signals). Ms.P.Sullivan Page 1 of 8
So by using the previous diagram as an example: Bubbles (the girl) speaks and creates a sound wave with her voice (analogue signal) The analogue signal is received by the microphone The microphone converts this signal into a series of 1s and 0s The series of 1s and 0s are then stored on the computer as a digital file. In this example, the microphone is considered to be an ATD (analogue-to-digital) device. Then there are also (DTA - Digital to Analogue devices) such as the speakers which receive a digital signal (sound generated by the computer) and convert it to sound (analogue signal) which can be heard by the user. Another example of a device capable of converting from digital to analogue and analogue to digital is the modem. So, let s consider the following example of a PC connected to the Internet via a modem where the user is sending and receiving e-mails. The work carried out by the modem is explained in the next diagram. Ms.P.Sullivan Page 2 of 8
Dear John, Is it OK if we meet at 6? 100101010101 001010101010 ISP Dear John, Is it OK if we meet at 6? 100101010101 001010101010 So by looking at the previous example the following process occurs: Our user (let s call him Peter) types an e-mail to John. This e-mail is stored on his laptop as binary signals. As soon as he clicks on Send the binary signal is sent to the modem which converts this signal into an analogue signal (sound wave). This signal is passed through the telephone network. Ms.P.Sullivan Page 3 of 8
It is received by the ISP (Internet Service Provider) which sends it back to where it is required using the telephone network. Once the analogue signal arrives at its destination it is received by the modem which converts it back to binary. The binary signal is received by the computer and changed back to its original form so it can be read by John. Analogue and Digital An analogue signal is a continuous signal with varying values. The values represented in analogue devices are not rounded up. On the other hand a digital signal has rounded up values at certain points in time. Let s consider an easy example involving a measuring scale and two apples. Analogue Scales Digital Scales If we have three apples and their total weight is 443g, the pointer on an analogue scales will point to an exact location on the scale. When using a digital scale, it has a restriction of the smallest unit it can measure. So let s say that for this example the smallest unit is 5g, if we measure the apples on the digital scales instead of marking 443g it marks 445g because it rounds up the values. Note: Although an analogue scales might seem more precise than the digital scales, nowadays digital scales are very precise because the smallest unit they can represent has become very small (for example 0.01g). Also, it s very difficult to read the exact value on a analogue scales since it s not very clear. Ms.P.Sullivan Page 4 of 8
Now, by applying the concept of the weighing scales to an IT related example we can use the following example of a signal represented by a wave. An analogue signal recorded as a wave would look something like this. As you can see from the diagram this is a continuous wave, you can choose any point on the graph and get an exact value. But before this can be used on a computer, it must be converted to a digital signal (this is called sampling). This will result in the following graph. Now, one can see the difference, in the digital signal the values are less accurate since they are rounded up (hence the wave is less smooth). However, with advances in IT the digital wave is using more approximations hence making the digital signal very close to the analogue signal. Ms.P.Sullivan Page 5 of 8
Units of storage A bit is the smallest unit in a computer system; this can only store the values of 0 or 1. A bit by itself is too small to store anything since it can only store 2 possible combinations; therefore bits are grouped with each other to be able to store larger amounts of data. A group of 8 bits make up a single byte. Typically a byte can store a single character since 8 bits are required for a single character. For example if the letter F is to be stored, according to the extended ASCII the binary code is 01000110, therefore 8 bits. 8 Bits 1 Byte So if the word Apples must be stored a total of 6 Bytes are required (1 byte for each letter). This amounts for the total of 8x6=48 bits. A byte is still a small unit to measure larger files. So bytes can be grouped with each other to form kilobytes. A kilobyte is made up of 1024 bytes. 1024 Bytes 1 KiloByte Ms.P.Sullivan Page 6 of 8
This system continues with the same multiples for megabytes, gigabytes and terabytes. So, to summarise: Unit Equivalent Bit (Can only store 0 or 1) Byte 8 Bits Kilobyte (KB) 1024 Bytes Megabyte (MB) 1024 Kilobytes Gigabyte (GB) 1024 Megabytes Terabyte (TB) 1024 Gigabytes Converting amongst different units In order to convert from a small unit (example byte) to a larger unit (example megabyte) one must use division. On the other hand when converting from a larger unit (example terabyte to a smaller unit (example gigabyte) one must use multiplication. The following table can be used as a guideline. Bit Division Byte Kilobyte Megabyte Gigabyte Terabyte Multiplication If we want to convert 3MB into KB (bigger to smaller unit; therefore multiplication) o 1 MB = 1024 KB, therefore 3 x 1024 = 3072 KB If we want to convert 7680 Bytes into KB (smaller to bigger unit; therefore division) o 1 KB = 1024 Bytes, therefore 7680/1024=7.5KB If we want to convert 2TB in to MB, two steps have to be done: o 1TB = 1024GB, therefore 2 x 1024 = 2048MB Then, 1GB = 1024MB, therefore 2048 * 1024 = 2097152MB Ms.P.Sullivan Page 7 of 8
Typical Storage The following is a table stating the average (or typical) storage amounts of various computer storage devices. Device Storage Other Possibilities Floppy Disk 1.44MB CD 700MB DVD 4.7GB 8.7GB, 9.4GB Pen Drive 8GB 2GB, 4GB, 16GB, 32GB Blu Ray 25GB 50GB, 100GB Hard Disk 500GB 1TB *** Ms.P.Sullivan Page 8 of 8