Thursday, February 27, 2014

CSC-5 Binary Notation and Wikipedia Assignment

After the first term test and a long reading week, we begin to touch on binary notation in the lectures. Early machines have limited stuff to represent numbers, characters and colours based on 0s and 1s. There are 256 numbers including 0 to represent the numbers. For example:

represent 2:
10
represent 3:
11
represent 4:
100
represent 5:
101
represent 6:
110
represent 7:

111
We can find that the last digit represents whether the number is odd or even. 0 represents even and 1 represents odd. The second last digit is to divided the number by four so and so forth. 
Therefore, we can get a rule that b7:128 b6: 64 b5: 32 b4: 16 b3:8 b2: 4 b1:2 b0:1
So when we can use bits to find out the exact number. For example:
01100110:128*0 +64*1+32*1+16*0+8*0+4*1+2*1+0*1

In reverse, we can transfer exact number into 8-bit binary with two methods.
Represent 104 as an 8-bit binary:
(< 104 128) so start with 0
(>= 104 64) so next bit is 1
(- 104 64): 40
(>= 40 32): so next bit is 1
(-40 32): 8
(< 16 8): so next bit is 0
(>= 8 8): so next bit is 1
(-8 8):0
so 4, 2 and the 1 bit are p
#b01101000

Alternatively get the bit from the right to the left:
104 is even, so right-most bit is 0
(quotient 104 2): 52
even, so next bit is 0
(quotient 52 2): 26
even, so next bit is 0
(quotient 26 2): 13
odd, so next bit is 1
(quotient 13 2): 6
even, so next bit is 0

We can also represents number into characters. In Dr. Racket, if we put #\a, we can find the exact numbers to represent a character.
e.g. integer->char 104 à #\h

Also we can use it to represent colours. (make-color red green blue transparency) There are 0-255 levels. When these mixtures combined, it may make different colours. For example, when we put (255 255 255 0) in the Dr. Racket, we will get the white and transparent colour. In this week's lecture and quiz, we will cover colour list. This is a list that all the colours to make a picture. 

This week, we begin to touch on the second part of the wikipedia assignment. At first, I am quite confident with the assignment. Now, I find that it is difficult for me to create a new sandbox for my assignment. I plan to figure out this by reading the instruction and policy in wikipedia editing page. I will begin to do this as soon as possible and discuss my approaches to figure out the problems I have when I do the assignments in my next post. 

Friday, February 14, 2014

CSC-4 Term test

Today is term test, we can use aid sheet but no much question about the history of computing thinking and machines. It may be helpful for next term test or exam. The test began at 9:00. It is quite different from the past test that it has lots of programming questions in the test and there is only on short answer question at front. This post is for recording my first test in computer science course. :)

Thursday, February 13, 2014

CSC-3 Vanishing Leprechaun

In today's lecture, we are discussing something about a classical problem which is the Vanishing Leprechaun.
We discussed about how it can change from 14 Leprechaun to 15 Leprechaun. First of all, we need to rearrange them and then group it. We grouped three Leprechauns up and then split it into different rectangles. Then if we remove the Rectangle we everything will complement mutually and create a new 15-Leprechaun picture. One Leprechaun lost its leg and then it can make a new one. I still need some time to figure out what will be the solving process of this tricky question. 

Tomorrow will be our first term test, there are a lot of history stuff need to be remembered. However, programming is sill the main thing we need to focus on. 

Tuesday, February 11, 2014

CSC-2 History

Today's lecture focus on reviewing some historical events of the computer science. I know that in the 1950s, people have strict machine which are slow and have small memory. Therefore, people cannot do what they want to do. As time flies, some computer scientists developed the programming language and supplied some convenience for writing the programs. In 1970s, the machine became faster so that it allows programmers to design more with the increasing memory size. Now, we have so much computing power than ever we have. It is about quadrillion times. The computing power speed in an amazing pace.

This friday is our first term test. I am reviewing some videos online and the notes online. I am still struggle with some programming. I hope I can get through it before the term test. For instance, the ture, flase, and, or terms are quite confusing so I need to do some operation in Dr.Racket to figure it out.

I am looking forward to doing the WIKI assignment so that I can make some contributions to wikipedia online.

Friday, February 7, 2014

CSC-1 Transparency and Make color

This week, we talked about the transparency in the Dr. Racket. I am so confused about the color-code and transparency. I try to struggle with all these stuffs in Dr. Racket by practicing but I cannot find the right track though.

Also we talked about the list and structure in this week lecture which I found so interesting and amazing. It is kind of my first time to contact computing and programming stuff. Therefore, I fell so excited when I do something with my programming software.

Next week, it is gonna be our first term-test. In lecture, I cannot follow the pace when I try to take note. Fortunately, there are some online notes summary so I can complete my notes with these materials. Also I got my quiz2 back. There was a tricky question there about the check-expect. I should properly review those kinds of materials before the test.

It is the first blog for my CSC 104. I am quite excited about the following programming project. so I will continue updating something about the course and my feeling. :)