Tuesday, 6 November 2007

typical assembly language instructions

typical assembly language instructions are as follows:
  • locical instructions (and, not, or, shift left, shift right)
  • rotate instructions
  • arithmitical instructions (bit set, bit reset)
  • program contol instructions (jumps)

addressing modes

addressing modes are related to physical attributes liek registers available andwoord length.
The most common adresssing modes are outlined below:

register addressing
if data is transferred from a source register to a destination register then this is an example of register addressing. an example would be
mov ds,ax
this instruction copys the data contained in the source ax and places it in the ds register.

immediate addressing
theis is where the data appears immediatly after the oop code, as part of the instruction. for example the number 20 in the example as follows:
mov ax, 20
this instruction places 20 into the register ax.

direct addresssing
ddirect addressinng refers directly to a specific memory location. example:
mov ax,[mydata]
the instruction copies the contents of memory location 'mydata' (specified by a label) into the ax register.

indirect adressing
indirect adddressing uses a number inside a register to point to the memory location of interest where the actual data can be found. example:
mov ax, [bx]
in this instruction the memory location pointed to by [bx] (and not the actual number in it) is copied to the ax register.

indexed addressing
for indexed addessing anumber contained in one register is usually used in combination with thee number in another register to point to the actual memory location where the data is stored. example:
mov cx, [bx + di]
this instruction the number in the bx register is combined with the number in the di register and the result points to the memory location where the source data is located.



assembly language

assembly language is a second generation low level language made up from mnemonics which can be used as instead of machine code as it is easier to use. the format of anassembly code instruction consists of 4 parts:
  • label - used as a reference
  • op code - contains the mnemonic
  • operands - describes the source data which is being operated on
  • comments - provide convenience for programmer

an instruction only has to contain two of these though as labels are not needed for all instructions and comments are optional.

Tuesday, 16 October 2007

task 23

Step 1 : It begins with a 1
Step 2 : The mantissa is : 1.010110000
Step 3 : Negative Binary : -(0.101010000)
Step 4 : The exponent is : 000011 which is 3
Step5:The decimal point in the mantissa must now be moved 3 places to the right.
Step 6 : the mantissa is now : -(1010.11)
Step7:Converting to denary :-5.25

task 14

STEP 1: This number is positive. I know this because the left most bit is a zero.
STEP 2: The mantissa is: 0.11101000
STEP 3: The exponent is 000101 which is positive because left most bit is a zero.
STEP 4: The denary equivalent of 000101 is 3
STEP 5: The decimal place in the mantissa must be moved right because the denary value is positive
STEP 6: The mantissa now looks like this 0111.101000 STEP 7: Removing the redundant zeros the mantissa now looks like this 111.101STEP 8: The final denary answer is 7.625

task 8

Task 8. Convert these fixed-point numbers into denary fractions using the above method:
a) 01111100 : 7 1/2
b) 00000100 : 1/2
c) 11000001 : 24 1/8

task1

Suppose you had 3 bits to represent 2s complement numbers
(a)What is the weighting of each bit? -4, 2, 1
(b)What is the largest number that can be represented? 3
(c)What is the smallest number? -4

frames

through using frames we can view more than one html document on the page
there is disadvantages to this such as:
the page is difficult to print
the web developer has to keep track of more than one document

FRAMESET TAG


The frameset tag defines how the window will be divided into into frames
Each frameset defines a set of rows or columns
The values of the rows/columns indicate the amount of screen area each row/column will occupy


i created links through using an anchor with a href inside it

an anchor can also be used for creting a bookmark on a page

the href attribute is used to address the page to link to, and the words inside the anchor tag will be displayed as a hyperlink.



here is what it looks like in notepad ++




Wednesday, 5 September 2007

my summer project

Over the summer i took part in a nuffield bursaries thing and I had to create a program . I decided that the project should be to do with something I liked and something that goes hand in hand with programming is gaming. So after some thought i decided to create a web application which takes a persons postcode and gamertag then uses googles API to plot the persons location and show their gamertag in a info window :).
Heres a few screenshots of it.



















































One thing about the google API is that it requires alot of hard-coding, so to make an application which automated the api was somewhat difficult. The google API uses geo coordinates to set the marker in the correct place. So for the application to automatically find the correct geo coordinates after a postcode was typed in required a database, Sadly a full uk database costs £2500 to buy from royal mail and then an aditional £1000 for it to be updated each year. I therfore had to find something more in my price range (£0) and after alot of hours of searching i found a database which has geo coordinates for the first section of a postcode so i used that. Its not perfect as its not as accurate as it could be but its ok for deonstration purposes. Also while im on the subject; if anyone would be generous enough to give me a full ostcode database it would be much appreciated.

Tuesday, 4 September 2007

html

In computing so far we learnt about html





  • html is a text file


  • it also must have a closing html tag eg


  • it defines elements using tags


  • these tags tell the browser how to show the text


to aquire knowledge on html i used http://www.w3schools.com/ as my learning resource. on this site it gives tutorials on how successfully create a webpage using html.



we use notepad++ to type in our html and run it in a browser here is a screen shot of it in use: