Harvard - CS50x - Week 0 - Notes

Computer Science is all about computational thinking. Thinking like a computer.

Computational thinking means to think more methodically and algorithmically.

Thinking computationally boils down to solving problems.

In BINARY system we have powers of two and only two digit 0 and 1. Unlike in the DECIMAL system,where we have ten digits and power of ten.

BITS is Binary Digits.

Taking real world analogies or tool kit with which we are already familiar with and solving problems with the help of them, is Computational Thinking.

A computer program where decisions get made is essentially a bit of maths and "If" statements. - Bill Gates

Source Code is the code which humans right, which computers are able to comprehend after a few steps of interpolation.

The largest value which you can represent with 8 bits or one byte is 256, but not counting from zero.

A VARIABLE stores a piece of information.

ARRAYS are something which allows us to store more than one piece of information.

Base 10 or Decimal notation has the power of 10 embedded in it.

In Binary notation system, the base becomes two, because it eliminates the other 8 digits. There are only 2 digits, 0 and 1.

So instead of like in decimal system having tens place, hundreds place and thousands place so on and so forth, in binary system we have the powers rising by 2 ie 2s place, 4s place, eight place and so on and so forth.

To figure out a number from a binary system, we first write down all the places or power of binary beneath the number and then multiply it with corresponding place.

    So - 1 0 1 1 1 0 0 1
         128 64 32 16 8 6 4 2

         1 * 128 + 1 * 32 + 1 * 16 + 1 * 8 + 1 * 2
         = 128 + 32 + 16 + 8 + 2
         = 186

ANSI stands for American National Standards Institute.

ASCII - American Standard Code For Information Interchange (1963)

ASCII was designed as 7 bit encoding, that means each character was represented with a combination of 7 numbers of 0 and 1. So with 2 posibilities for each bit either 0 and 1. There could be 2^7 = 128 characters could be represented with ASCII system.

In ASCII, the first 32 numbers are reserved for the control characters.

NUL - 0000000

DEL - 1111111

NUL and DEL were used for paper-tape editing, which was the common form of storing data.

In Paper-Tape storing of data, for a 0, nothing was done and for 1, a hole was punched.

So in Paper-Tape storing, the NUL would do nothing, leave the column intact, while the DEL would punch a series of hole (7).

The Decimal digits - 0 to 9 correspond to binary digits 48 to 57.

    Common pre-fix of 011 and then each number is mapped to its binary notation. So 0 is 0110000 and so on and so forth.

The bit that is second from the left hand side is all 0 in the upper case letters and all 1 in the lower case letters. So converting any letter from upper-case to lower-case involves changing only 1 bit.

    Eg: 1000001 - 65 - A
           1100001 - 97 - a

       

Comments

Popular posts from this blog

Coursera - CS 101 - Completed