What I learned this week:
1. Digital and Binary Concept
Computers are based on two ideas, digital and binary. Digital means the discrete states in stead of smoothly-moving states. Binary is the smallest and most easily designed states. It is a number system with a base 2 instead of 10 in our most frequently used number system.
2.Boolean System
Professor explained Boolean logic by using electric circuit.
(and a b): the output is true if and only if both a and b are true.It is false if either a or b is false.
(or a b): the output is true if either a or b is true. It is false if and only if both a and b are false.
(not true) is false.
(not false) is true.
3.binary operation
0 + 0 =0
0 + 1 =1
1 + 0 =1
1 + 1 =0 (carry 1 to the next digit)
how to convert binary number to number:
for example: 110 = 0 *1 + 1*2 + 1*4 =6
My questions on DrRackt:
key-press : image string -> image
; Produce the current image for any key except
; down arrow, but STOP for down-arrow
(define (key-press im k)
(cond
[(equal? k "down") (stop-with STOP)]
[else im])) ------> here I don't understand "cond" and "equal?" What is the "k" for?)
(check-expect (key-press BAR "hello!") BAR) ---> What does this mean? what is the "hello!" for?)
(check-expect (key-press SH "down") (stop-with STOP))
Questions on the lecture:
How to write numbers in binary?
Sunday, February 17, 2013
Tuesday, February 12, 2013
Weekly Log4
What I learned last week:
Last week I learned something new to mess with pictures in DrRacket. First one is "list". Obviously, "list" function can list strings, pictures and numbers.For example,if we define "menagerie" as "list" several pictures, we can get the first picture of the list by inputting "first menagerie". We can the rest of the list by inputting "rest menagerie". Similarly, "reverse menagerie" gives the reverse version of the list.
Also, "struct" is like a customized combination which can include numbers, strings, pictures, and so on. We can define-struct something as a combination of picture, name and number of feet(place holders).For example, define-struct "venus" name pic feet.Then define specific things by "make-venus" and tells DrRacket the exact name, picture and number of feet.(define venusA (make-venus "elephant" jumbo 4)). We can get particular elements, such as the number of feet, by saying (venus-feet venusA), DrRacket should give us "4" back.
We can also see the whole list of colors of a picture by inputting "(define pingu-list (image->color-list pingu))". DrRacket will give us a long list. The first number is the red color, second is the green, third is the blue and the last is the level of opacity.
What I am confused about:
How many arguments can "define-struct" contain? What is the maximum? How does DrRacket list all the colors? Through which order? From Top right to bottom left?
Feedback of the Test:
I studied for the test with a friend and we talked about things we were confused about and exchanged notes. This helps both of us and we both think the test is not as hard as we expected it to be. Here is one thing we need to improve that we should focus on memorizing instead of understanding stuffs. it is more efficient to try out new functions in DrRacket.
Tuesday, February 5, 2013
Weekly Log3
What I learned about computer history:
This week we finally finished the computer's history. We started from 1930s, the era of mechanical computing 1930c mechanical computing devices continued to develop information stored and manipulated in the macroscopic position of devices such as gears, relays, and inputs include punched cards, paper tapes.Examples are Hollerith's device for tabulating US census and analog computers, which store information in a smoothly-varying form. Then there comes electro-mechanical computers which use both electronic components and mechanical components. All electronic computing devices store information in vacuum tube, such as American Atanosoff-Berry machine which is not programmable. Later, ENIAC invented and could solve all problems Turing machine could solve.Transistors finally replaced vacuum tubes in 1950s due to its small, reliable efficient features compared with vacuum tubes'large power consumption, large space requirement and unreliability when warmed up. Then Von Neumann architecture developed, meaning storing both data and instruction to manipulate in the same memory device,Small-scale experimental machine and EDSAC implemented it. Then UNIVAC mass produced computer appeared. The invention of microprocessors in 1970s implied the dawn of contemporary computers.
More familiar with Dr.Racket:
I learned the big-bang function and can make an event now.
My refection:
Then tendency of the development of computers seems to be more portable, programmable, engery-efficient,and electronic.
The funding is vital to technology since Charles Babbage designed difference engine and analytic engine (the prototype of modern computers) but failed to produce them due to inadequate financing.
My Questions: Does electro-mechanical computers more advanced than mechanical ones? How? Is Electro-mechanical considered "electronic"? What is "Electronic" except for the usage of vacuum tubes.
Subscribe to:
Posts (Atom)