======Part 3======
=====Entries=====
====Entry 9: April 19th, 2012: 3:50 PM EST====
Todays learning expendentures invloved von neumann vs. harvard architecture comparisons. The part that stuck out to me the most was how similar they are while being so different. The von neumann architecture can either be reading an instruction or reading/writing data to/from the memory. They cant both happen at the same time because the instructions and data use the same system bus; whereas the harvard architecture, ceteris paris, just separates the reading to two separate system busses so that different types of processing can be done simultaneously.
Also, I did a little bit on binary vs. hex representation. Just a little spiel on base 16 vs. base 2 and base 10 for decimal. Also showed how to convert between binary, decimal and hex.
|Bit Placement|bit 8|bit 7|bit 6|bit 5|bit 4|bit 3|bit 2|bit 1|
|Value|128|64|32|16| 8| 4| 2| 1|
|Decimal|Hexadecimal|Binary|
|0|0|0000|
|1|1|0001|
|2|2|0010|
|3|3|0011|
|4|4|0100|
|5|5|0101|
|6|6|0110|
|7|7|0111|
|8|8|1000|
|9|9|1001|
|10|A|1010|
|11|B|1011|
|12|C|1100|
|13|D|1101|
|14|E|1110|
|15|F|1111|
====Entry 10: April 21st, 2012====
I/0, input/output, taking stuff in and pushing stuff out. The part that stuck out to me the most was how easy it was to relate input and output for a person to a computer. Computer input/output involves any peripheral devices such and a mouse, a keyboard, a printer, a monitor, etc... Just as a person has input like sight, sound, touch, smell, and taste.
Also, a cpu has input/output because the processing it does receives information, does something, and spits the information out. This relates to our cpu, our brain, receiving input and sending output. Kinda lame, but it was cool to see the similarities, and nothing else really stood out.
====Entry 11: April 27th, 2012 5:04 EST====
Been working on binary manipulation programs for a couple days now. Creating functions to increment(add one), decrement(subtract one), lshift(shift to the left one digit) rshift(shift to the right one digit) and a few others. The purpose of these manipulations is to implement them in use with registers. Once i finish them I will make a few registers(arrays filled with bits) and perform some manipulation on them with the functions I created in an attempt to simulate processor functionality. Tomorrow I will probably create load and store so that i can go from registers to memory(store) and memory to registers(load) so that i can get even further into the cpu simulation.
The way I have done my binary manipulations is a little different though, as it does not directly implement a carry. While the algorithm indirectly uses a carry in most of the functions, not all implement a carry in use, just in theory. So some of my functions, like increment, look a little different becasue there is no carry, like so:
void increment(char *array)
{
int i;
for(i=7;i>=0;i--)
{
if(array[i] == 0)
{
array[i] = 1;
break;
}
else
{
array[i] = 0;
}
}
}
====Entry 12: May 1st, 2012====
I think I will dedicate this dated entry to the people outside the MLC window screaming about how the government is trying to brainwash them while they pay way too much for college. I would write about something else, but I can't concentrate because they are TOO LOUD.
Todays work was all about boolean logic. I made a comparrison between true and false boolean and 1 vs. 0. I made two different programs to compare boolean values of true and false to 1 and 0. They set a boolean value to one and zero and then compared those values with boolean values of true and false. I know I am just saying the same thing over and over, but I don't really have anything else to say.
{{page>asmpart3&nofooter}}
=====Experiments=====
====Experiment 7====
===Question===
Does the Boolean value true equal a 1 or 0 while false equals the other? Can a numeric comparison be made?
===Resources===
bytes.com -> forumns.
===Hypothesis===
Based on my extensive research(all 5 minutes of it) I believe that the boolean value true can be expressed as an arithmetic 1, which false is 0.
===Experiment===
I will create a simple program that will add a boolean expression, such as (value == value1) to a number to see if the number increases.
===Data===
#include
#include
int main()
{
int i = 1;
int value = 4;
int value2 = 4;
bool check = true;
printf("Before: %d\n", i);
i = i + (value == value2);
printf("After: %d\n", i);
if(check != i)
{
printf("David is a awesome");
}
else
{
printf("chickens are invading the bk lounge");
}
return 0;
}
===Analysis===
Based on the data collected:
* Was your hypothesis correct? Yes, it was right on target
* Was your hypothesis not applicable? no
* Is there more going on than you originally thought? (shortcomings in hypothesis) none that i can see
* What shortcomings might there be in your experiment? none that i can see
* What shortcomings might there be in your data? none that i can see
===Conclusions===
What can you ascertain based on the experiment performed and data collected?
Boolean logic(true or false) can be related to 1 vs. 0. The value true is equal to the value one, while false is equal to 0.
====Experiment 8====
===Question===
Can you set a bool equal to 1 and have it represent true? If not what happens?
===Hypothesis===
Based on the forumns i have read, and past experiments I have done, I believe there is a good chance of it working.
===Experiment===
Ima write some code that sets a bool equal to 1, and see if it executes as true.
===Data===
#include
#include
int main()
{
bool value = false;
bool check = true;
value = 1;
if(value == check)
{
printf("Theya re too loud");
}
else
{
printf("i hate this");
}
return 0;
}
===Analysis===
Based on the data collected:
* Was your hypothesis correct? yes, yes it was
* Was your hypothesis not applicable? nope
* Is there more going on than you originally thought? (shortcomings in hypothesis) not that i see
* What shortcomings might there be in your experiment? if i knew, they wouldent be in there
* What shortcomings might there be in your data? if i knew, they wouldent be there
===Conclusions===
What can you ascertain based on the experiment performed and data collected?
We knew that in the background boolean was just 1 and 0, we just didn't see it anymore because they are set to true or false. Now I can see that nothing really changed, and that boolean is still 1 or 0, they are just equivalent to true or false.
====Retest 3====
Perform the following steps:
===State Experiment===
David Schoeffler
My final experiment will be whether you can declare an auto variable without initializing it and if so how will it respond.
http://www/opus/spring2012/dschoeff/start
===Resources===
Evaluate their resources and commentary. Answer the following questions:
* Do you feel the given resources are adequate in providing sufficient background information? yes, he provided a source pdf covering the implementation of the autotyped variable.
* Are there additional resources you've found that you can add to the resources list? they are all redundant of the information in the pdf
* Does the original experimenter appear to have obtained a necessary fundamental understanding of the concepts leading up to their stated experiment?adequate
* If you find a deviation in opinion, state why you think this might exist. none
===Hypothesis===
State their experiment's hypothesis. Answer the following questions:
I do not believe you will not be able to declare the auto typed variable without initializing it.
* Do you feel their hypothesis is adequate in capturing the essence of what they're trying to discover? yes
* What improvements could you make to their hypothesis, if any? none
===Experiment===
Follow the steps given to recreate the original experiment. Answer the following questions:
* Are the instructions correct in successfully achieving the results? yes
* Is there room for improvement in the experiment instructions/description? What suggestions would you make? none that i see without being rediculous
* Would you make any alterations to the structure of the experiment to yield better results? What, and why? none
===Data===
Publish the data you have gained from your performing of the experiment here.
I used the original experimentee's materials, so i received the same results from the same code:
1: #include
2:
3: using namespace std;
4:
5: int main()
6: {
7: auto autovar;
8: cout << "enter value to put in auto typed variable: " ;
9: cin >> autovar;
10: cout << "value stored in auto typed variable - > " << autovar << endl;
11:
12: return (0);
13: }
lab46:~$ g++ --std=c++0x autotest.cc -o autotest
autotest.cc: In function 'int main()':
autotest.cc:7: error: declaration of 'auto autovar' has no initializer
lab46:~$
===Analysis===
Answer the following:
* Does the data seem in-line with the published data from the original author? yes
* Can you explain any deviations? none
* How about any sources of error? none
* Is the stated hypothesis adequate? entirely
===Conclusions===
Answer the following:
* What conclusions can you make based on performing the experiment? The auto typed variable cannot be used without first being initialized
* Do you feel the experiment was adequate in obtaining a further understanding of a concept? yes
* Does the original author appear to have gotten some value out of performing the experiment? yes
* Any suggestions or observations that could improve this particular process (in general, or specifically you, or specifically for the original author). none