Today was a fun-filled talk about instruction sets. We are in the process of creating an instruction set forour 6502 wannabe.
Each instruction is allocated 4 bytes of memory, and are laid out as follows.
instruction | first byte | second byte | third byte | fourth byte |
and | 000.00.00.x | 00.xxxxxx | xxxxxxxx | xxxxxxxx |
or | 001.00.00.x | 00.xxxxxx | xxxxxxxx | xxxxxxxx |
not | 010.00.xxx | 00.xxxxxx | xxxxxxxx | xxxxxxxx |
if/branch | 011.00.xxx | xxxxxxxx | branch address | branch address |
move | 100.xx.xx.x | xxxxxxxx | xxxxxxxx | xxxxxxxx |
These are not yet fully developed, as you can see by move and others, but they are great progress!.
I also started to develop my schedule for next semester. It looks like I will be taken hpc1, hardware 101, electricity 101, and another computer course that yet again has slipped my mind! that should be 13 credits, so financial aid? i think so!
This weeks experiences haven't been fun filled, but I have certainly learned a lot. Maybe it is time for a little recap:
Storage: Volatile vs. Non-volatile.
Volatile memory refers to short term memory, such that is only kept when there is power to the memory. An example of this type of memory is RAM, which is used to store information temporarily while the computer is running. An example of this RAM is CPU RAM, which is used as quick access storage for the CPU.
Non-Volatile memory refers to long term memory, such that is kept whether there is power to the computer or not. An example of this type of memory is your hard drive, where most of your computers information is stored.
Understanding the difference between these two helps to shed light on what RAM is used for. Since the RAM is cleared every time the computer is powered off, it must hold information that is created when the computer is started, or when a program is started, but does not affect the programs start-up. In other words it does not contain any of the instructions for the computer of it's programs, just the information they create that is pertinent to it's current running state.
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
Remember that 4 is just the minimum number of entries. Feel free to have more.
This is a sample format for a dated entry. Please substitute the actual date for “Month Day, Year”, and duplicate the level 4 heading to make additional entries.
As an aid, feel free to use the following questions to help you generate content for your entries:
Remember that 4 is just the minimum number of entries. Feel free to have more.
An internal element that transfers data between computer components, or between computers.
A bus is a way to connect a peripheral device for data transfer. They have evolved from a different card for every peripheral to universal busses to connect many different peripherals through the same bus. These busses can range from a system bus, to attach a cpu, to a universal serial bus to connect anything from a mouse or keyboard to another harddrive.
Few more examples:
An address bus is a computer bus that is used to specify a physical address. When a processor needs to read or write to a memory location it specifies that memory location on the address bus.
Early processors used to you a single wire for each address bit that it sent, meaning a 32 bit address bus used a 32 wire connector. This was soon replaced by cutting the address in half and sending it in two waves, cutting a 32 bit address bus down to a 16 wire strip.
The width of the address bus determines the amount of memory a system can address.
An asynchronous signal that indicates the need to look at a certain event or tell running software to change its execution.
Hardware Interupt:
Software interupt:
Stax yo! a stack is a last in, first out data gobbling beast! Also called a LIFO if you must. These work like a stack of papers. The last page you set on the stack is the top page, and you cannot access any of the pages below without first moving/removing the pages above it. They are commonly implemented using a linked list, but can also be implemented by use of an array.
There are three common stack operations, and they are as follows:
#include"stack.h" Stack *push(Stack *notes, int val) { Node *stick; stick=(Node *)malloc(sizeof(Node)); stick -> value = val; if(notes -> top == NULL) { notes -> top = notes -> bottom = stick; } else { notes -> top -> prev = stick; stick -> next = notes -> top; notes -> top = notes -> top -> prev; } return notes; }
It's a bunch o' bits wrapped up all nice and neat for a computer to read, like an instruction of sorts. The number of bits in a word(size, width, length) is defined by the proccessor design, or the computer architecture. The size of a word reflects the computers operation. Registers are often word sized, and the largest peice of memory that can be moved into working memory is the size of word. Common sizes today are 32 and 64 bit.
Depending on how the computer is structured, units of the word size can be:
Puttin stuff in spots to keep it for a while. The retension of information.
short term
long-term
A portion of code running inside a program that has one specific purpose and is relatively independant of the rest of the code to be performed.
A subroutine is also called a subprogram, and as that insinuates, it will act much like a program itself, running inside a larger program. A subroutine is usually code that can be called multiple times from multiple places inside the program.
Subroutines are often collected into libraries, and contain programs such as mathmatical computations.
The fetch-execute cycle is the basic operation cycle of a computer. This cycle is repeated by the CPU from startup to when the computer is shut down and is the process by which the computer retreives its instructions from memory.
The cicuits used in a fetch-execute cycle are:
So, to break it down:
familiarity with how assembly impacts programming.
How assembly will impact the styles and flow of programming. How the code is put together in functions.
General discussion on how assembly affects programming. Matt has expressed that assembly and processor commands can affect programming styles by helping to make code more efficient.
The only good way to measure this is to review some code that I recently wrote to see if i can relate my new knowledge of assembly and processor instructions to coding styles.
I can see how processor commands can affect programming styles. I can not yet really optimize any code or change the flow based on what the processor does/receives, but I believe that by the end of this course I will be able to optimize my code at least a little by being processor sensitive.
There is deffinitely room for improvement, I think I need to do some research on assembly commands so that I can better understand what the processor is being told because of the code I am writing.
How can an ethernet cable provide power to an end device?
Power over ethernet is done by sending a dc current over four of the wires.
I will research PoE and find an example of how PoE sends a dc current over the same line that data is sent over. Also, there is a PoE phone in the lair, so i will mess around with that to see it in action.
I hooked an IP phone up to a PoE supplier that adds a dc current to the ethernet cable. I also plugged an active ethernet cable into the PoE supplier so that it was supplying a dc current and an internet signal over the same line.
Wikipedia displays a great table that shows the pins used in a PoE setup for both 10/100 and gigabyte PoE connections.
Based on the data collected:
PoE is a very powerful tool that can be very useful when there are a lot of IP phones or wireless access points that need to periodically be reset. All one has to do is simply reboot the source of the ethernet cables and all end devices will be reset.
If I am connected to a gigabyte switch that has a dedicated line from roadrunner, will the download/upload of my computer by a gigabyte?
I can only reach speeds of 100mbps or whatever the incomming line allows me to reach.
I will hook my laptop up to a gigabyte router and do speed testing like speedtest.net, command prompt things to check speed rates, and network and sharing center.
Speedtest.net claims 96mbps, 100mbps and 92mbps. network and sharing center claims anywhere from 56-400 mbps depending on what i'm downloading. command prompt, essentially doing the same thing speedtest.net, claims about 92-98mbps.
Based on the data collected:
Your connection speed is based on your hardware/connection. If everything allows 1000mbps, then you could essentially get 1000mbps. If you have a 1000mbps connection, and only a 100mbps port, then you will only get 100mbps.
Perform the following steps:
David Schoefflers experiment on autp typed variables. http://lab46.corning-cc.edu/opus/spring2012/dschoeff/start#experiment_2
Evaluate their resources and commentary. Answer the following questions:
State their experiment's hypothesis. Answer the following questions:
Follow the steps given to recreate the original experiment. Answer the following questions:
Publish the data you have gained from your performing of the experiment here.
1: #include<iostream> 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: }
I ran the same code and received the same errors in compiling
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:~$
Answer the following:
Answer the following: