Symbolic Representation & Coding

Of course, we must be able to represent numbers and text in a computer and we cannot actually put cars and roads into a computer to simulate and analyze traffic so we must represent these real-world objects on the computer to perform a traffic simulation.  We must also represent real-world processes so we must create algorithms that are encoded as programs (note I stated real-world processes, not the computer program vs. computer process I introduced last week and will further define in Operating Systems).  With this basis, we can see that we need to represent and encode 2 basic categories in the real world (real-world objects and processes) as data and programs.  This will become very apparent in our Linux Labs as we will have files and processes and the files themselves are identified as executable files and non-executable files.  Now at the discrete level, we must also acknowledge files/data are represented in binary (0s & 1s), stored as bits that are grouped into bytes in memory and if stored on a Hard Drive they are grouped into clusters (multiple sectors where sectors are 512 bytes).

Computer Representations

Two’s Complement – number representation

ASCIIUnicode – character encoding

Boolean Data Type – True/False representation

Little Endian and Big Endian – byte interpretation

Parity Bits – error detection

Bitmapped vs Scalable Vector Graphics (SVG) 

Ok, here the text shows its age/limitations with its exhaustive coverage of Raster/Bitmapped Graphics as SVG is the present and future for many reasons including its robust support in HTML5. Here are some nice presentations of the differences/advantages between the formats:

Bitmapped/Raster vs. Vector Images Video: https://youtu.be/Km7aGg7h9x4

Bit-mapped/Raster Graphics

For bit-mapped or raster graphics, a picture is worth 1000 words so this from Wikipedia explains RGB color as well as anything. The RGB color model is an additive color model in which red, green, and blue light are added together in various ways to reproduce a broad array of colors. Now it makes sense to store the Red, Green and Blue components (various scales of Red, Green & Blue) in a byte each so => 3 bytes or 8 bits per byte => 24-bit color.

 

Here is a youtube video demonstrating the digitization process… it is far better than my poor attempts to draw pictures on the whiteboard – 🙂

Image Digitization

Vector Graphics

From Wikipedia: Vector graphics is the use of polygons to represent images in computer graphics. Vector graphics are based on vectors, which lead through locations called control points or nodes.

Now Vector Images support Object-Oriented principles as the vectors/objects or their composition (sub-objects/vectors) can be acted on independently.  Converting a picture to a vector image requires edge detection. Now humans can do this very easily as we do this every day but rather complex processing is required for a computer to perform edge detection.  There are many good videos on YouTube on this topic but they are lengthy lectures.

Audio Digitization (Sampling)

 Teaching computers to understand Raster Graphic