Thursday, 25 October 2007

PHP and MySql

Today in class we created a simple database using XAMPP and MySql:


To display information from the table on web browser we used html code with php embedded in it. Using our memory sticks as a web server and the URL http://localhost/ we were able to display the information we wanted displayed.

Web Browser



We selected to display the products in bullet point form from our database.

Code



As you can see this looks like an ordinary html document but if you notice is also has <?php.....?>. This shows php is being used.

Monday, 22 October 2007

More PHP

Here is a mind map of some of the things i have learned about PHP:

Thursday, 18 October 2007

PHP

PHP stands for PreHypertext processor
PHP is a server-side scripting language, like ASP
PHP scripts are executed on the server
PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)
PHP is an open source software (OSS)
We downloaded XAMPP and and installed in on our memory sticks. We are going to use this for our coursework.

Thursday, 4 October 2007

Binary

Task23


A two byte floating point numbering system uses 10 places for the mantissa and 6 for the exponent. Convert the number 1010 1100 0000 0011 into decimal by filling in the following:
Step1:The number is negative. I know that because the left most bit is a one.
Step2:The Mantissa is: 1.010110000
Step3:The mantissa converted into a negative binary number that is not in 2s complement form is: -(0101.010000)
Step4:The exponent is : 000011 = 3
Step5:The decimal point in the mantissa must now be moved 3 places to the right.
Step6:The mantissa is now -(101.01)
Step7:Converting to denary :-5.25

Wednesday, 3 October 2007

Binary

Task 14


A two byte floating-point numbering system uses 10 places for the mantissa and 6 for the exponent. Convert the number 0111 1010 0000 0101 into decimal by filling in the following:
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.101
STEP 8: The final denary answer is 7.625

Tuesday, 2 October 2007

Binary

Task8


Convert these fixed-point numbers into denary fractions:
(a)01111100 =15.5
(b)00000100 =0.5
(c)11000001 =24.125

Monday, 1 October 2007

Binary Floating Point Representation

Task 1


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