Class 2: What is a computer?

Computing for Molecular Biology 1

Andrés Aravena

19 October 2020

What is a computer?

What is the difference?

What can we do with a computer?

  • calculate formulas
  • solve (some) equations
  • store and retrieve huge quantities of data
  • find patterns in data
  • find data matching a pattern
  • transform data in useful ways
  • compress data
  • move data at low cost without distortion

What does Computer means?

The dictionary says that:

  • it is an electronic device
  • for storing and processing data
  • according to instructions given in a program
  • the program can be changed

In summary

A computer is a general purpose device that can

  • read, process and write numbers
    • (and things that can be represented by numbers)
    • to and from the memory
  • following a program stored also in the memory
    • many simple steps

Changing the program changes the purpose of the machine

What is a Computer?

Computer
(English) counter, calculator
Ordinateur
(French) sorter, gives order to data, handles data
Bilgisayar
(Turkish) Information/Data counter

A computer is a counter

So computers handle numbers

Store numbers and calculate with numbers

Computers handle numbers

Numbers represent information

Computers can transform and transfer information

Transform means sorting and doing math

Transfer means using the network to communicate

“but I don’t use numbers …”

Don’t worry

Numbers can represent other things

Keyword:

Representation

We represent sounds by symbols

We use symbols like A Ö æ ñ j r, to represent our voice

We also use symbols to represent music: 🎶🎵

In Chinese language, symbols represent ideas: 电脑

The key word here is “represent”

We can represent complex things with numbers

Example: Sound

  • Sound is transformed into electricity by a microphone.
  • The voltage is measured 44100 times each second
  • Each sample is stored as a number in a CD

Two steps: sampling (in time) and discretization (in voltage)

Example: Greyscale Image

Example: Greyscale Image

  • Each “point” has a value between 0 (black) and 255 (white)
  • The correct name is pixel, meaning picture element
  • They are stored line by line

Color images use three layers

Courtney, Jane. (2001). Application of Digital Image Processing to Marker-free Analysis of Human Gait. 10.13140/2.1.1046.7847.

Each color layer has values 0–255

Karim, S. M. Masud & Rahman, Md & Hossain, Md. (2011). A new approach for LSB based image steganography using secret key. 286-291. 10.1109/ICCITechn.2011.6164800.

Numbers can represent a lot of things

  • Images
  • Audio
  • Movies
  • DNA, RNA or protein sequences
  • Structure of Proteins
  • Concentration of molecules
  • All kind of experimental results
  • Papers and publications

Parts of a computer

Hardware and Software

Since old times physical tools are called hardware

That includes al the physical parts of the computer

Programs determine the function of the computer,
but they are not “physical”

That is software

Biological analogy

All cell components are hardware

The sequence of the DNA is the software

Parts of a computer

Processor(CPU) Interface(I/O) Memory(RAM) Secondary storage(Hard disk) Network

CPU

The processor or central processing unit (“CPU”) is the computer’s brain

  • does arithmetic,
  • moves data around,
  • controls the operation of the other parts
  • can decide what to do next based on the previous results

CPU can do only a few things, and it does them very fast

RAM: random access memory

The primary memory

  • stores information that is in use
    • the data that the CPU is currently working on
    • the instructions that tell the CPU what to do
  • its contents can be changed by the CPU

The primary memory is also called random access memory

Your computer has a small amount of RAM

You can think of the RAM as

  • a large collection of little boxes
  • labeled from 1 up to 100 million
  • each box can hold a small amount of information.

RAM circuits are expensive

A typical computer has 16 × 109 “little boxes”

Computers have bad memory

When they don’t have energy, RAM forgets all

and all this currently active information is lost

That’s why it’s prudent to save your work often

Electric problems can be a real disaster

All data must be stored in secondary memory
(also called secondary storage)

Secondary storage

  • The RAM is expensive, so it is smal
  • its contents disappear when the power is turned off
  • Secondary storage holds data even when there is no power
  • The most common kind are magnetic disks
    • also called hard disk
  • The disk stores much more information than RAM

Disks and secondary storage

Data on secondary memory remains for long time
(even without electricity)

Today secondary memory is

  • hard disk
  • USB stick
  • Cloud storage

Secondary storage is slow

Data, instructions, and everything else is stored on the disk for the long term

And brought into RAM only for a short time

Disk space is about 100 times cheaper than RAM

But accessing information is much slower.

Primary memory is like a desk

Secondary storage is like a bookshelf

Memory size is measured in Bytes

Computers handle memory in small blocks

  • Big enough to hold a single character
    • like W or @
  • Or a small integer number (0 to 255)
  • These blocks are called Bytes

Byte

Integer between 0 and 255

One letter

Exercise: Memory size

How much can you store in your computer? Please answer these two questions:

  1. What is the capacity of the memory of your computer?

  2. What is the capacity of the disk?

Questions?