Karbosguide.com - Module 1a2.

About Bytes


Contents:

  • Introduction
  • ASCII
  • About text and code
  • Data in files
  • Next page
  • Previous page

  • Introduction

    The most basic data processing is word processing. Let us use that as an example. When we do word processing, we work at a keyboard similar to a typewriter. There are 101 keys, where we find the entire alphabet A, B, C, etc. We also find the digits from 0 to 9 and all the other characters we need:,.-;():_?!"#*%&etc..

    All these characters must be digitized. They must be expressed in 0s and 1s. Bits are organized in groups of 8. A group of 8 bits is called a byte.

    8 bits = 1 byte, that is the system. Then, what can we do with bytes? First, let us see how many different bytes we can construct. A byte is an 8 digit number. We link 0s and 1s in a pattern. How many different ones can we make? Here is one: 01110101, and here is another: 10010101.

    We can calculate that you can make 2 x 2 x 2 x 2 x 2 x 2 x 2 x 2 different patterns, since each of the 8 bits can have 2 values.

  • 28 (two in the power of eight) is 256. Then there are 256 different bytes!

    Now we assign a byte to each letter and other characters. And since we have 256 patterns to choose from, there is plenty of room for all. Here you see some examples of the "translation:"

    Character
    Bit pattern
    Byte
    number
    Character
    Bit pattern
    Byte
    number
    A
    01000001
    65
    ¼
    10111100
    188
    B
    01000010
    66
    .
    00101110
    46
    C
    01000011
    67
    :
    00111010
    58
    a
    01100001
    97
    $
    00100100
    36
    b
    01100010
    98
    \
    01011100
    92
    o
    01101111
    111
    ~
    01111110
    126
    p
    01110000
    112
    1
    00110001
    49
    q
    01110001
    113
    2
    00110010
    50
    r
    01110010
    114
    9
    00111001
    57
    x
    01111000
    120
    ©
    10101001
    169
    y
    01111001
    121
    >
    00111110
    62
    z
    01111010
    122
    10001001
    137

    When you write the word "summer", you write 6 letters. If the computer has to process that word, it will be digitized to 6 bytes. In other words, the word summer occupies 6 bytes in the PC RAM, when you type it, and 6 bytes on the hard disk, if you save it.


    ASCII

    ASCII means American Standard Code for Information Interchange. It is an industry standard, which assigns letters, numbers, and other characters within the 256 slots available in the 8 bit code.

    The ASCII table is divided in 3 sections:

  • Non printable system codes between 0 and 31.

  • "Lower ASCII" between 32 and 127. This part of the table originates from older, American systems, which worked on 7 bit character tables. Foreign letters, like Ø and Ü were not available then.

  • "Higher ASCII" between 128 and 255. This part is programmable, in that you can exchange characters, based on which language you want to write in. Foreign letters are placed in this part.

    Learn more about the ASCII table in Module 1b


    An example

    Let us imagine a stream of bits sent from the keyboard to the computer. When you type, streams of 8 bits are sent to the computer. Let us look at a series of bits:

    001100010011001000110011

    Bits are combined into bytes (each 8 bits). These 24 bits are interpreted as three bytes. Let us read them as bytes: 00110001, 00110010, and 00110011.

    When we convert these byte binary numbers to decimal numbers, you will see that they read as 49, 50, and 51 in decimal numbers. To interpret these numbers, we have to look at the ASCII table. You will find that you have typed the numbers 1, 2, and 3.


    About text and code

    Now we have seen the PCs user data, which are always digitized. But there are many different kinds of data in the PC. You can differentiate between 2 fundamental types of data:

  • Program code, which is data, that allows the PC to function.

  • User data, like text, graphics, sound.

    The fact is, that the CPU must have instructions to function. You can read more about this in the review of the CPU in module 3a. An instruction is a string of data, of 0s and 1s. The CPU is designed to recognize these instructions, which arrive together with the user input data to be processed.

    The program code is thus a collection of instructions, which are executed one by one, when the program runs. Each time you click the mouse, or hit a key on the keyboard, instructions are sent from your software (program) to the CPU, telling it what to do next.

    User data are those data, which tells the software how to respond. The letters, illustrations, home pages, etc., which you and I produce, are created with appropriate software.


    Files

    Both program code and user data are saved as files on the hard disk. Often, you can recognize the type of file by its suffix. Here are some examples:

    Content File name
    Program code START.EXE, WIN.COM, HELP.DLL, VMM32.VXD
    User data LETTER.DOC, HOUSE.BMP, INDEX.HTM

    This is written as an introduction to naming files. The file name suffix determines how the PC will handle the file. You can read about this subject in some of my books, e.g. "DOS - teach yourself" (only available in Europe.


  • Next page
  • Previous page


    Learn more

    Read more about the boot process and system bus in Module 2b

    Read more about I/O buses in module 2c

    Read more about the motherboard chip set in module 2d

    Read more about RAM in module 2e

    Read about EIDE in module 5b

    [Main page]
    [Karbo's Dictionary]
    [The Software Guides]



    Copyright (c) 1996-2016 by Michael B. Karbo. www.Karbosguide.com.