Wednesday, 28 September 2011

Introduction to Computers,Programs & Java (part 2) The storage capacity

Storage device
1. Every memory device has a storage capacity.

2.The storage capacity (example,256 MB,1GB,2GB etc ) indicates the number of bytes it can hold.

3.Computer data is using binary system that consists of ones and zeros in a string or line.

4. Each string has eight set of binary number (zeros and ones) that we call them as bits.Meaning,1 string = 8 bits.

5. 8 bits = 1 Bytes 

6.Example,00000100 = 1Byte

7.1 Byte = 1 Character.

8.Example,the capital letter "K" is expressed in binary system as 01001011.

9.1 Bytes is the smallest amount of transfer.

10.Example,a Gif image with 4 kB,equal to 4 kilo bytes (4000) bytes.Meaning,it has 4000 thousand set of string,with 8 bits each string.Example :
00000001
00000010
00000100
00001000
.
.
.
.
.
 (until 4000 strings)

Hence,4000 strings (bytes) x 8 bits = 32,000 thousands of bits (0 and 1) for single gif image.

11.Do remember that,KB = Kilo Byte and Kb=Kilo bits.

12.A kB is 8 times larger than kb.Why,kb = 1000 bits,while kB = 1000 (00000000).

13.Mathematically,1 kB = 1000 bytes.Actually, 1 kB is not equal to 1000,but 1024.This is because,mostly computer memory used traditional measurement instead of modern measurement aka SI units aka Metrix system.


14.See below,traditional and modern measurement:
Figure 1 : indicates the traditional measurement that widely used in memory system.

Figure 2 : the green marks indicate the traditional measurement.While white marks indicate the SI standard that we commonly used in life.
Hence,
15.1kb/kilo bits /Kbps = 1024 bits = 128 bytes 
16.1024 bytes = 1 kilo bytes
17.1024 kilobytes = 1MB
18.1024 MB = 1 GB
19.1024 GB = 1 Tera Bytes

Introduction to Computers,Programs & Java (part 1)

Under the topic,we will cover several aspects,they are,
1. Hardware
2. Software
3. Computer and its components
4. an operating system

1.Hardware
Refers to objects that we can actually see and touch, like disks,display screens, keyboards, printers,processor,memory and chips.Refer figure 1 and 2
Figure 1 : Refer to figure,system unit also called peripheral device.
Figure 2 : shows,an example of hardware (hard disk).Everything that's currently "in the computer" is actually stored on that hard disk
2.Software
In contrast, software is untouchable. Software exists as ideas, concepts, and symbols.Examples,microsoft word,internet explorer.Handphone,Atm machine is an example of applications developed using proggraming language.

3.Computer and its components
a. Central processing unit /CPU /processor.

Two type of processor :
i. ALU /Aritmethic Logic Unit - performs arithmetic (addressing 4 basic operations,addition,substraction,multiply,division with integers,real number etc )and logical operations.
ii. CU / Control Unit - extracts instructions from memory and decodes

b. Memory.
Memory can refer to many types of memory within computer,but normally we refered to RAM / Random acces memory

There's too much "stuff" on our computer's hard disk to use it all at the same time. During the session sitting in front of the computer, we will probably use only a small amount of all that's available. The stuff we working with at given moment is stored in random access memory (often abbreviated RAM).


So if RAM is so fast, why not we put everything in it? Why have a hard disk at all? The answer to that lies in the fact that RAM is volatile. As soon as the computer is shut off, whether intentionally or by an accidental power outage, every thing in RAM disappears, just as quickly as a light bulb goes out when the plug is pulled. So you don't want to rely on RAM to hold everything. A disk, on the other hand, holds its information whether the power is on or off. 

Hence,all the information is stored on our computer's hard disk. we will  never see the actual hard disk because it's sealed inside a special housing and needs to stay that way. Unlike RAM, which is volatile, the hard disk can hold information forever -- with or without electricity. 

c.Storage devices -Floppy dicks,zip disc
d.Input and output devices- Keyboard,mouse,speaker
e.Communication devices-Broadband,router 

Monday, 26 September 2011

Introduction to Mathematica (part 2)

Mathematica Basics.
1.Alphaneumeric format.
When we use alphaneumeric (combination of alphabet and numbers ) ,it should not beginning with digit.But must be started with alphabet.

Example :

As we write 2b,mathematica will show us “2 b”,with spacing in the middle.This infact, “2 b” = 2xb.The correct way to use alphaneumeric is b2 instead of 2b 

2. Exponentiation
Exponention is represented by using ^,hence,x^y means :



3.Semicolon
Semicolon ie ; can avoid mathematica from showing the result of each calculation.Example:

a=4 after (shift+enter)
4
a=3 after (shift +enter)
3
c = a + b
7

The number 4 and 3 above can be avoided from display by mathematica by adding semicolon.See example below:

a=4;
b=3;
c=a+b
7
4. Use parenthese for modofication
Example:2+3*5 = 17
(this follows the standard operation,multiply first followed by plus operation)
However,we can modify this by adding a parenthese bracket.Dont use square or round bracket.

Example : (2+3)*5 = 25

5.N expression
a. N[expression] - gives the approximation to 6 significant digits (mathematica's default)
Example :
N[Pi]
3.14159

b.N[expression,n] - an approximation accurate to n significants digits.
N[Pai,50]
3.1231456758697087867543213245