To convert 110010101 to binary, first we begin with the number on the far right and we move left until the last digit. So (1*(2^0) =1). The next number to the left is 0; (0*(2^1) = 0). The next number to the left is 1; (1*(2^2) = 4). The next number to the left is 0; (0*(2^3) =0). The next number to the left is 1; (1*(2^4) =16). The next number to the left is 0; (0*(2^5) =0). The next number to the left is 0; (0*(2^6) =0). The next number to the left is 1; (1*(2^7) =128). The next number to the left is 1; (1*(2^8) =256). Now we take the sum of all the answers and we should be done with the conversion. 1+0+4+0+16+0+0+128+256=405. The binary number 110010101 is equal to 405 in decimals.
To convert decimal to binary, we check to see if the decimal number is divisible by 2, if it is we write 0 and if it is not then we write 1 and subtract 1 from the decimal number and divide the number by 2. We keep doing this until the decimal number becomes 0 always writing a 1 or 0 to the left of the previous number. To convert the decimal number 529 to binary, we check to see if 529 is divisible by 2. It is not so we right 1 and subtract 1 making it 528 and divide it by 2. Again we check if 264 is divisible by two. It is so we write a 0 to the left of the previous 1 making it 01. We divide 264 by two and we get 132. We check if 132 is divisible by 2 and it is so we write another 0 to the left of 01 making it 001 and divide 132 by 2. We check if 66 is divisible by 2 and it is so we write another 0 to the left of 001 making it 0001 and divide 66 by 2. We check if 33 is divisible by 2 and it is not so we write 1 to the left of 0001 making it 10001, subtract 1 from 33 making it 32 and divide by 2. We check if 16 is divisible by 2 and it is so we write 0 to the left of 10001 making it 010001 and divide 16 by 2. We check if 8 is divisible by 2 and it is so we write 0 to the left of 010001 making it 0010001 and divide 8 by 2. We check if 4 is divisible by 2 and it is so we write 0 to the left of 0010001 making it 00010001 and divide 4 by 2. We check if 2 is divisible by 2 and it is so we write 0 to the left of 00010001 making it 000010001 and divide 2 by 2. We check if 1 is divisible by 2 and it is not so we write 1 to the left of 000010001 making it 1000010001, subtract 1 from 1 making the decimal number 0. So, 529 in decimal converted to binary is 1000010001.
The difference between a positional and non-positional numbers are the order or "position" of the numbers. For example, binary numbers are positional numbers. 101 in binary has a different value than 110 because the position of the 1s provides a different value. 101 is equal to 5 in decimal numbers and 110 is equal to 6. On the other hand, in non-positional numbers, the order of symbols does not matter and does not change the value of number. For example, in the Egyptian numerals a frog is equal to 100,000 and a vertical line is equal to 1. Regardless of how the frog and the vertical line are ordered (frog then vertical line or vertical line then frog) they will amount to the same value, 100,001.
Thursday, February 22, 2007
Thursday, February 15, 2007
ModeLing the WorLd
I find it quite intriguing to see how technology is adapting to our needs through patterns which can be converted into models. I have recently experienced that first hand and I was extremely fascinated by the experience even though the model used wasn’t very accurate. Recently I signed up with Netflix, the online movie rental site. I was asked to rate about 100 movies that were randomly selected. After I was done with the rating, they had probably 780 recommendations of movies that I might enjoy. I initially noticed that some of their recommendation where actual movies that I have seen and really enjoy. So through time, every time I noticed a movie I‘ve seen before, I went ahead and rated it knowing what that will affect. Now, two months later, I am not saying that their recommendation list is 100% “on point” but it has in a way gotten smarter. So, if initially, their recommendation list was half of the time on point, it is now, probably, 70%. Yes, quite scary but extremely convenient for me. They are clearly using a model to compare my ratings with other members’ ratings and correlating our information (i.e. similar movies we rated 5 stars, number of times we ordered the same title that we rated x stars, etc). In my opinion, this is very convenient but equally, very alarming. Great read though!
Unix Commands
I have learned several Unix commands. Some of my favorites where:
ls:
This lists the directories and files in a specified directory. It more or
less, shows me the thing under a specified folder, whether it be more folders or files.
rm "filename":
This command removes a specified file from a specified directory
with the correct file path or from within the directory I am in.
cd:
This command basically changes directory.
cal:
Produces a calendar. You may specify the year for the calendar simply by following the command with a year ie: cal 2007.
exit:
This command simply exits the remote system.
I hope this could be of some use to some beginner Unix users.
ls:
This lists the directories and files in a specified directory. It more or
less, shows me the thing under a specified folder, whether it be more folders or files.
rm "filename":
This command removes a specified file from a specified directory
with the correct file path or from within the directory I am in.
cd:
This command basically changes directory.
cal:
Produces a calendar. You may specify the year for the calendar simply by following the command with a year ie: cal 2007.
exit:
This command simply exits the remote system.
I hope this could be of some use to some beginner Unix users.
Wednesday, February 7, 2007
Comments on "Modeling the World"
From "Modeling the World" lecture I found that most of the models expressed that a person should understand the problem, think of ways to solve it, experiment and carryout the plans, and last but not least to reflect. I found that Polya's method explained the process best and in good detail. I also found the fact that some things in life emulate the fibonacci model in form was absolutely mind blowing.
Subscribe to:
Posts (Atom)