Learn Computer Science

Learn Computer Science 

1.2. Computing Basics

Everyone has some level of familiarity with computers and computing devices just aseveryone has familiarity with automotive basics. However, just because you drive a careveryday doesn’t mean you can tell the difference between a crankshaft and a piston. Toget started, let’s familiarize ourselves with some basic concepts.

A computer is a device, usually electronic, that stores, receives, processes, and outputsinformation. Modern computing devices include everything from simple sensors to mobiledevices, tablets, desktops, mainframes/servers, supercomputers and huge grid clustersconsisting of multiple computers networked together. 

Computer hardware usually refers to the physical components in a computing systemwhich includes input devices such as a mouse/touchpad, keyboard, or touchscreen, outputdevices such as monitors, storage devices such as hard disks and solid state drives, aswell as the electronic components such as graphics cards, main memory, motherboardsand chips that make up the Central Processing Unit (CPU). 

Computer processors are complex electronic circuits (referred to as Very Large Scale Integration (VLSI)) which contain thousands of microscopic electronic transistors–electronic“gates” that can perform logical operations and complex instructions. In addition tothe CPU a processor may contain an Arithmetic and Logic Unit (ALU) that performsarithmetic operations such as addition, multiplication, division, etc. 

Computer Software usually refers to the actual machine instructions that are run on aprocessor. Software is usually written in a high-level programming language such as C orJava and then converted to machine code that the processor can execute. 

Computers “speak” in binary code. Binary is nothing more than a structured collectionof 0s and 1s. A single 0 or 1 is referred to as a bit. Bits can be collected to form largerchunks of information: 8 bits form a byte, 1024 bytes is referred to as a kilobyte, etc.Table 1.1 contains a several more binary units. Each unit is in terms of a power of 2instead of a power of 10. As humans, we are more familiar with decimal–base-10 numbersand so units are usually expressed as powers of 10, kilo- refers to 103, mega- is 106, etc.However, since binary is base-2 (0 or 1), units are associated with the closest powerof 2. Computers are binary machines because it is the most practical to implement inelectronic devices. 0s and 1s can be easily represented by low/high voltage; low/highfrequency; on-off; etc. It is much easier to design and implement systems that switchbetween only two states.  

1.3. Basic Program Structure

Unit 2n Number of bytesKilobyte (KB) 210 1,024Megabyte (MB) 220 1,048,576Gigabyte (GB) 230 1,073,741,824Terabyte (TB) 240 1,099,511,627,776Petabyte (PB) 250 1,125,899,906,842,624Exabyte (EB) 260 1,152,921,504,606,846,976Zettabyte (ZB) 270 1,180,591,620,717,411,303,424Yottabyte (YB) 280 1,208,925,819,614,629,174,706,176 


Table 1.1.: 
Various units of digital information with respect to bytes. Memory is usuallymeasured using powers of two. 


Computer memory can refer to secondary memory which are typically longterm storagedevices such as hard disks, flash drives, SD cards, optical disks (CDs, DVDs), etc. Thesegenerally have a large capacity but are slower (the time it takes to access a chunk of datais longer). Or, it can refer to main memory (or primary memory): data stored on chipsthat is much faster but also more expensive and thus generally smaller.  

The first hard disk (IBM 350) was developed in 1956 by IBM and had a capacity of3.75MB and cost $3,200 ($27,500 in 2015 dollars) per month to lease. For perspective,the first commercially available TB hard drive was released in 2007. As of 2015, terabytehard disks can be commonly purchased for $50–$100. 

Main memory, sometimes referred to as Random Access Memory (RAM) consists ofa collection of addresses along with contents. An address usually refers to a singlebyte of memory (called byte-addressing). The content, that is the byte of data that isstored at an address, can be anything. It can represent a number, a letter, etc. To thecomputer it is all just a bunch of 0s and 1s. For convenience, memory addresses arerepresented using hexadecimal, which is a base-16 counting system using the symbols0, 1, . . . , 9, a, b, c, d, e, f. Numbers are prefixed with a 0x to indicate they representhexadecimal numbers. Figure 1.1 depicts memory and its address/contents. 

Separate computing devices can be connected to each other through a network. Networkscan be wired with electrical signals or light as in fiber optics which provide large bandwidth(the amount of data that can be sent at any one time), but can be expensive to build andmaintain. They can also be wireless, but provide shorter range and lower bandwidth. 

Post a Comment

0 Comments