Tuesday, November 6, 2007

Assembly language

Assembly language is a second generation language made up of mnemonics which is easier to use than machine code. The assembly language instruction consists of four parts:




  • Label


  • Op Code


  • Operands


  • Comments


Assemblylanguage is intimately tied up with addressing modes. These are related to physical attributes like the registers available and the word length. The most common addressing modes are:





  • Register addressing - If data is transferred from a source register to a destination register


  • Immediate addressing - This is where the data appears immediately after the opcode, as part of the instruction.


  • Direct addressing - Refers directly to a specific memory location


  • Indirect addressing - Uses a number inside a register (usually an index register) to point to the memory location of interest where the actualdata can be found


  • Indexed addressing - A number contained in one register is usually used in combination with the number in another register to point to the actual memory location where the data is stored.

Locical operations

the 'and' function - An output of 1 is only produced when the inputs on both registers are 1

the 'or' function - An output of 1 is only produced if one input OR the other input OR both inputs are 1.

Masking - When using the logical 'and' and 'or' functions, we can create a mask which either lets a pattern of bits through, or blocks them.

the 'xor' function - An output of 1 is only produced if one input OR the other input and not if both inputs are 1 or 0.

the 'not' function - The bits are inverted meaning that any bits in inputed as 0 will be outputed as 1 and vise versa.

Shift operations

arithmetical shift (left or right) - This type of shift preserves the sign of the number. with the rules of binary a shift to the right would multiply a number by 2 and a shift to the left would divide the number by 2. However if two's complement is used then the sign must be preserved, or negative numbers may change into positive numbers and vice versa when these multiplication or division operations are being carried out. The sign bit must therefore be preserved, and this is the difference between a logical shift(which does not preserve the sign) and an arithmetical shift(which does).

Rotate instructions - this allows you to look at numbers which are too big to be contained in a single register. Instead of digits "falling off"the end, they are directed round the path shown by the arrows and redirected into the other end of the register.

instructions required to divert the flow of the program to different parts depending on the state of some particular condition is known as jump instructions and is essential and important for assmbly language.

The assembler

An assembler is software that converts the assembly language mnemonics into machine code ready for execution on the target machine. Without an assembler you would have to translate each assembly language mnemonic into machine code by hand.

The assembly language language mnemonics would normally hav to be written using a text editor. The listings of the assembly language mnemonics is called the source code or the source program. After the assembly process has been carried out, we end up with the machine code program which is called the object code or the object program.

The main features of a typical assembler



Saturday, November 3, 2007

Mysql

I will be using Php and Mysql for my coursework!
Mysql is a open source database server. Mysql stores data in rows, columns and cells. These tables in mysql hold records and you can use queries to access and output the information like this :
SELECT (row, column or cell name) FROM (table name)

In Mysql's database you can not access the data without creating a connection with the database of where the data is located.
In PHP this is done with the mysql_connect() function.
Also to close a connection before the script ends use the mysql_close() function.

Monday, October 8, 2007

Task 30

- The mantissa shows you what actual digits are in the number
- The exponent shows you how many places to move the decimal point and in what direction, so that you can get it back to the original number

Task 27

1. 1011.001
2. 0001 011.0 01
3. 1110 100.1 11
4. 1.010 0111 00
5. 4 places to the right
6. 000100
7. 1.010 0111 0000 0100

Task 20

1. It begins with the digit 1
2. 1.0011
3. -(0.1101)
4. -1
5. 1 place to hte left
6. -0.01101
7. No unnecessary zero's
8. ( 1/4 + 1/8 + 1/32 ) = -0.40625

Task 18

1. 10.11
2. 0.101 1000 00
3. Right
4. 0000 10
5. 0101 1000 0000 0010

Task 15

1. The number in the very left is 01
2. 0.110 0001 10
3. The number in the very left is 01
4. 6
5. Right because it is a positive number
6. 0110 000.1 10
7. 0110 000.1 10
8. 48.75

Wednesday, October 3, 2007

This is answers to tasks 1-7 that were given as work....they should be correct!

Tuesday, September 18, 2007

My mind map of ch37


This is my revision mind map for chapter 37 in my computing txt book....This chapter is about different high level languages! This mind map will be very helpful for revising!

My counter!

This is the counter that i designed in visual basic 2005 express edition!
It uses a 7 segment display to create a number between 0 and 9.... it is quite simple to use as you just imput a number between 0 and 9 in the text box and then hit display to show the number you want on the 7 segement display!
I will put more up on my counter soon!

Thursday, September 13, 2007

My Personal Web Browser!!!

Today i have been working on visual basic 2005 express edition and i have made my own web browser!

Here is an image of what it looks like:

I have made my browser have some helpful browsing buttons such as a back, foward ,refesh buttons. I also created a button so i can directly go to google, which is pretty handy as google is the biggest search engine used today and i use it alot.

Wednesday, September 5, 2007

Clicking my link!


Clicking my link will result in google opening!

Shown in this image is google opened!

My Link




The html link that i had written will show up like this if you open it with a browser.

September 5th




Here is a link i made to google using the anchor tag and Href!

Tuesday, September 4, 2007

September 4th

I am working through HTML tutorials and i am learning about HTML links which involves creating hyperlinks and making images into links, this is done by using the anchor tag and Href attribute.

September 3rd

Today i learned a number of things about HTML. I learned that Html works with tags and that there is a starting and ending tag. The tags are placed between the two characters <> here are some examples of the new tags that i have learned:
b Starting bold text tag
/b Ending bold text tag
p Starting a new paragraph tag
/p Ending a new paragraph tag
br Line break tag
etc

I have also learned that html is not case sensitive but it is much more preferable to use lower case rather than upper. I now also know that a HTML file must have an htm or html file extension for the file to be able to be opened. A HTML file can be created using a simple text editor, i am using notepad++ for my html tutorials.