Table of Contents

Part 2

Entries

Entry 5: March 2nd, 2012

This time around we are still talking about the logic behind registers and how we will use them in our code. however that is the issue: what kind of register will we use? I prefer to use the 4 bit but i believe we are going with the 8 bit so it can store one full numerical value. Im just more comfortable using 4 bit but thats ok. We are also getting all our code together and i feel i havent helped that much. I have asked if i could help with coding in anyway but it seems they already finished the code we need or just dont need me, so i just go in the back and try to learn about the processor i was assigned.

Entry 6: March 9th, 2012

This week of class we continued more on registers and flip flops and also more about our processors. My processor was a AMD processor and it was actually quite difficult to find any information on it. But other then trying to find info, we just talked more about the implementation of registers will work for our simulation. And we have come to the conclusion that all we need for the emulation is a few logic operations (AND, OR, NOT) and a few others like flag or stop. In HPC i have started a project of just simply booting up linux onto my computer via USB. It can be easily done, just havent been able to write it up yet (or im too lazy lol)

Entry 7: March 16th, 2012

This we week we havent done much but discuss on how we would run the instruction set. Basically we have a 4 bit byte that will hold an instruction each. The first 2 bits will hold a memory for inout and the last 2 will be for the output. With this, it will be able to use an instruction such as AND. This is all that really remember us doing this week, we kind of stopped doing any actual work. In HPC I feel like this class is pointless at times for the lack of anything it has, however i have been trying to work on that script but i dont think i know shell scripting well enough to even touch this.

Entry 8: March 23rd, 2012

ASM has become a more independent study more then anything. We now just come into class, talk about a concept for a little then we just work on any project or opus work that we have. I dont mind having time to work on anything, its just i would like to actually work on something worthwhile. I feel like i am not learning what i should be, but thats just me. But with recent hours at work, i am having a horrible time trying to keep up with any work, i work ungodly hours and i am exhausted. I wil get work done, just might take some time.

Keywords

asm Keywords

Fetch-execute cycle

Definition

The sequence of actions that a central processing unit performs to execute each machine code instruction in a program. It goes through all the components of the computer such as the CPU, then the processor, instruction register, etc.

Demonstration

This picture accurately shows the route of this cycle.

Binary and Hexadecimal Number Representation

Definition

Binary representation is taking a decimal number, a number such as 6 and changing it into a binary number which would be 110. Now in binary it only uses 1 and 0, a computer can only read these values so thats why it is necessary for this. But if we were to get more intricate, we would get into hexadecimal. Hexadecimal is 0 to the letter f. In a computer we start getting bigger with our numbers so it compacts the binary down so we dont have huge lines of code.

Demonstration

This is a table of showing how to do simple conversions of smaller decimal numbers. it shows how binary and hex represents its numbers.

Boolean Arithmetic Operations (Addition, Subtraction, Multiplication, Division)

Definition

Boolean Arithmetic is the logic behind our logic gates such as AND, NOR, OR, NOT and so on. The operations behind it is what makes the magic happen. Addition and multiplication is all you really need because subtraction and division are just variances of the others. But like with addition you have 1 plus 1 equals 1 or 1 plus 0 equals 1.

Demonstration

These are the logic gates that would implement these type of operations.

Registers (General Purpose/Integer, Floating Pointer, Accumulator, Data)

Definition

General purpose registers can store both data and addresses, i.e., they are combined Data/Address registers. They can be known as GPR's. Floating point registers store floating points in many computers today. Accumulator which intermediate arithmetic and logic results are stored. Without a register like an accumulator, it would be necessary to write the result of each calculation (addition, multiplication, shift, etc.) to main memory. Data register can hold numeric values such as int, floating and even char.

Processor & Memory Organization

Definition

The number of registers in a processor unit may vary from just one processor register to as many as 64 registers or more. One part you will have is the accumulator AC or 'A' register. It is the main operand register of the ALU. Then you will have the data register (DR) acts as a buffer between the CPU and main memory. It is used as an input operand register with the accumulator. Then the instruction register (IR) holds the opcode of the current instruction. Next is the address register (AR) holds the address of the memory in which the operand resides. Lastly, the program counter (PC) holds the address of the next instruction to be fetched for execution. There can always be additional registers within the processor but these are the main ones you will find. There are actually more then one way to organize memory but it will general be connected to cache or RAM to store most of the data that is ran through the processor.

von Neumann vs. Harvard architecture

Definition

The most obvious characteristic of the Harvard Architecture is that it separates signals and storage for code and data memory. Typically, code (or program) memory is read-only and data memory is read-write. Therefore, it is impossible for program contents to be modified by the program itself. In the Von neumann architecture all signals and storage was shared, so it was easily changeable in a read-write memory.

Demonstration

Here is a picture example.

Logic Operations (AND, OR, XOR)

Definition

These logic operations are the simple operations of the logic gates. AND is where bot statement 1 AND statement 2 must be true for it to pass. OR is saying that statement 1 OR statement 2 need to be true in order for it to pass. XOR is saying that one of the 2 statements must be true and the other must be false, if anything else its not true.

Demonstration

AND

  1 // nick sano
  2 #include "and.h"
  3
  4 bool AND::getX()
  5 {
  6     bool tmp = false;
  7
  8     if((A == true) && (B == true))
  9     {
 10         tmp = true;
 11     }
 12
 13      return tmp;
 14 }

OR

  1 #include "or.h"
  2
  3 bool OR :: getX()
  4 {
  5     bool tmp = false;
  6     if((A == true) || (B == true))
  7     {
  8         tmp = true;
  9     }
 10     return(tmp);
 11 }

XOR

  1 
  2 #include "xor.h"
  3
  4 XOR::XOR()
  5 {
  6     myorgate = new OR();
  7     mynotgate = new NOT();
  8     myandgate = new AND();
  9 }
 10
 11 bool XOR::getX()
 12 {
 13     bool tmp = true;
 14
 15     myandgate -> setA(A);
 16     mynotgate -> setA(B);
 17     tmp = mynotgate -> getX();
 18     myandgate -> setB(tmp);
 19     myorgate -> setA(myandgate -> getX());
 20
 21     myandgate -> setB(B);
 22     mynotgate -> setA(A);
 23     tmp = mynotgate -> getX();
 24     myandgate -> setA(tmp);
 25     myorgate -> setB(myandgate -> getX());
 26     tmp = myorgate -> getX();
 27
 28     return(tmp);
 29 }

Negated Logic Operations (NOT, NAND, NOR, XNOR)

Definition

These are the negative operators of the logic table. NOT just takes what you currently have and negates it. NAND AND NOR take what they normally do (AND=1 and 2 both must be true, OR= 1 or 2 can be true) and just takes the opposite of what they do. So if it was true when AND was run, now that result will be untrue. and XNOR will run to see if both statements are true or both are false.

Demonstration

NOT

 1 #include "not.h"
  2
  3 bool NOT::getX()
  4 {
  5     bool tmp;
  6     tmp = ! A;
  7     return(tmp);
  8 }

NAND

 1 #include "nand.h"
  2
  3 NAND::NAND()
  4 {
  5     myandgate = new AND();
  6     mynotgate = new NOT();
  7 }
  8
  9 bool NAND::getX()
 10 {
 11     bool tmp = true;
 12
 13     myandgate -> setA(A);
 14     myandgate -> setB(B);
 15
 16     tmp = myandgate -> getX();
 17
 18     mynotgate -> setA(tmp);
 19
 20     tmp = mynotgate -> getX();
 21
 22     return(tmp);
 23 }
 24

NOR

  1 #include "nor.h"
  2
  3 NOR::NOR()
  4 {
  5     myorgate = new OR();
  6     mynotgate = new NOT();
  7 }
  8
  9 bool NOR::getX()
 10 {
 11     bool tmp = false;
 12
 13     myorgate -> setA(A);
 14     myorgate -> setB(B);
 15
 16     tmp = myorgate -> getX();
 17
 18     mynotgate -> setA(tmp);
 19
 20     tmp = mynotgate -> getX();
 21     return(tmp);
 22 }

XNOR

  1 #include "xnor.h"
  2
  3 XNOR::XNOR()
  4 {
  5     myxorgate = new XOR();
  6     mynotgate = new NOT();
  7 }
  8
  9 bool XNOR::getX()
 10 {
 11     bool tmp;
 12
 13     myxorgate -> setA(A);
 14     myxorgate -> setB(B);
 15     tmp = myxorgate -> getX();
 16     mynotgate -> setA(tmp);
 17     tmp = mynotgate -> getX();
 18
 19     return(tmp);
 20 }

asm Objective

asm Objective

An understanding of the concepts of assembly

Definition

Do you know what assembly is? How does it work? etc.

Method

I will discuss this and just state what i know of this language.

Measurement

Assembly language is the lowest level language that we have. It is used for microprocessors, processors, single instruction mechanical computers and a computer. Assembly Language uses 'mnemonic codes' or 'symbols'. Instead of remembering the exact memory locations where data and instructions are stored, symbolic memory addresses are used for data. In the language there is assemble that converts the assembly into object code. There is a single assembler and a multi one. both do similar things, just obviously one runs more then one.

MOV AL, 1h        ; Load AL with immediate value 1
MOV CL, 2h        ; Load CL with immediate value 2
MOV DL, 3h        ; Load DL with immediate value 3

this is an example of what assembly looks like. You have to move data line by line to get it where you want it. There are no shortcuts. Assembly is the basis of pretty much everything and without it, we would not have gotten as far as we did, today.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective. I think i did pretty well. We didnt touch assembly much but i think i have gained a little knowledge towards it and i believe i have conveyed the concept quite nicely.

hpc2 Keywords

Documentation

Definition

Documentation is very necessary when creating a program or even doing anything within the field of computing. If you type out a 3,000 line code and dont document, theres a chance of the person who wrote it forgetting everything that is going in this code. If a computer is being built or say, you are trying to fix a computer. You want to document your trial and errors so you dont make the same mistakes twice. Documentation just tells what you did in the past so if you do forget, its right there to remind you.

Demonstration

This is a sample of documentation inside code

// This right here is what documentation would look like
//inside your code

Backups

Definition

A back up is where you back up your entire system. Its a simple as that. You want to do this on a regular basis because computers are not fault proof. And if something happened and you were to lose something critical like, your OS or something, you would be really glad to have created that back up. Then you just pop it in, load it all up and boom whatever you backed up last is right in front of you.

Demonstration

A fun comic related to this, sort of. :)

Log analysis

Definition

Log analysis is where a software, it tech guy will go through records created through data logging and try to make sense out of them. Sometimes they just are not easily read by regular people, so we must debug the record to make it readable to others. Some common reasons we want to do this is for system troubleshooting, security incident response, and other stuff like that.

Demonstration

No demonstration :P

Remote Administration

Definition

This is when you control your computer from a remote location. Pretty much, a person can be at work and may want to use his computer. So he finds another computer with internet access and and will bring up a client that allows a person to see the GUI. Then as long as they know the IP of their computer, they can type that in and it will give them full access to their computer in a different place.

On-site Administration

Definition

On-site administration is basically the user at the current computer having full access to the computer. So it would be your own personal home computer and you will be able to mess with all the root files or you just can control what others can access. You are the ruler of your kingdom when your the sudo user.

Dual Booting

Definition

The act of installing multiple operating systems on a computer, and being able to choose which one to boot when starting the computer. So lets say for example the current computer i am usuing now. I had windows 7 on and still do, but with recent projects i went and installed a new OS called Ubuntu. Now with 2 OS on one computer, space needed to be partition and create a menu so you can choose between the 2 but other then that, that is what dual booting is.

Debian

Definition

Debian is a computer operating system composed of software packages released as free and open source software primarily under the GNU General Public License along with other free software licenses. It is closely similar to Linux, Ubuntu and the other free software you will find under this category. Debian is really good with keeping with the UNIX interface and having free software only, no pay. Debian can be installed on pretty much all computers, so go download it and try it out for yourself :D.

Security - Internal

Definition

Internal security is very important on your computer. Your computer is subject to viruses, worms, malware or anything that is set to get your information. To practice good security, you want to get some anti virus software, make sure you only use trusted sites, nothing that seems “off”. You want to keep people from seeing information they shouldnt or you dont want them to see. And its always a good idea to put some restrictions on your folders if they have personal/important information within them.

hpc2 Objective

hpc2 Objective

Demonstrate knowledge of Linux & Open Source

Definition

Talk about the use linux or other open source programs.

Method

I will discuss some concepts and provide some examples.

Measurement

Linux is a free and open source to the public. Anyone can download it and can be easily partitioned right onto your computer. However using it can be difficult. In order to use linux you have to have some knowledge of it. You should know simple commands like cd or ls and be able to navigate easily through the file system tree. It has a command line and a GUI so we can what is happening. Others sources like debian, ubunutu act similar to linux as they are branches off of linux and also open source. Open source are all free and may be difficult to read because its not as pretty as windows or apple. However it provides great software that works just as great as windows or apple. As well as those designed for general purpose use on desktops and servers, distributions may be specialized for different purposes including: computer architecture support, embedded systems, stability, security, localization to a specific region or language, targeting of specific user groups, support for real-time applications, or commitment to a given desktop environment. Furthermore, some distributions deliberately include only free software.

lab46:~$ ls
Cexetension.tgz   RandomStuff  contact.info.save  lab1a.text     pss
Desktop           Templates    courses            lastscript.sh  public_html
Documents         Videos       cpuEOCE            motd           puzzlebox
Downloads         a.out        data               networkcmds    puzzlepaper
FilelistforOPTAR  badname      dl                 newdirectory   scripts
Maildir           badname.tgz  hiopus             out            src
Music             bin          in                 outfile        tmp
Nyan Cat.wav      candy        invaderzim         output         unixprog
Public            classlog12   irc                pgm2ps
lab46:~$ vi lastscript.sh
lab46:~$ cd
lab46:~$ ls
Cexetension.tgz   RandomStuff  contact.info.save  lab1a.text     pss
Desktop           Templates    courses            lastscript.sh  public_html
Documents         Videos       cpuEOCE            motd           puzzlebox
Downloads         a.out        data               networkcmds    puzzlepaper
FilelistforOPTAR  badname      dl                 newdirectory   scripts
Maildir           badname.tgz  hiopus             out            src
Music             bin          in                 outfile        tmp
Nyan Cat.wav      candy        invaderzim         output         unixprog
Public            classlog12   irc                pgm2ps
lab46:~$ cd src
lab46:~/src$ ls
Makefile  cprog  cpu  discrete  hpc  submit  unix
lab46:~/src$ cd cpu
lab46:~/src/cpu$ ls
BF.txt       Makefile  Registers  example   gates    lib   turing.pdf
LOGIC.TABLE  README    circuits   flipflop  include  menu
lab46:~/src/cpu$ cd gates

Being able to navigate lets you search through the depths of what is linux and it will give you great knowledge of the world.

Analysis

Reflect upon your results of the measurement to ascertain your achievement of the particular course objective.

I feel i could have done better. I mean i talked about linux and what its about but now i question how much i actually know and if i should learn more. either way i think i got it down.

Experiments

Experiment 4

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Experiment 5

Question

What is the question you'd like to pose for experimentation? State it here.

Resources

Collect information and resources (such as URLs of web resources), and comment on knowledge obtained that you think will provide useful background information to aid in performing the experiment.

Hypothesis

Based on what you've read with respect to your original posed question, what do you think will be the result of your experiment (ie an educated guess based on the facts known). This is done before actually performing the experiment.

State your rationale.

Experiment

How are you going to test your hypothesis? What is the structure of your experiment?

Data

Perform your experiment, and collect/document the results here.

Analysis

Based on the data collected:

Conclusions

What can you ascertain based on the experiment performed and data collected? Document your findings here; make a statement as to any discoveries you've made.

Retest 2

Perform the following steps:

State Experiment

Whose existing experiment are you going to retest? Provide the URL, note the author, and restate their question.

Resources

Evaluate their resources and commentary. Answer the following questions:

Hypothesis

State their experiment's hypothesis. Answer the following questions:

Experiment

Follow the steps given to recreate the original experiment. Answer the following questions:

Data

Publish the data you have gained from your performing of the experiment here.

Analysis

Answer the following:

Conclusions

Answer the following: