Tuesday, November 25, 2014

Lossless and lossy compression

Lossless and lossy compression
are terms that describe whether or not, in the compression of a file, all original data can be recovered when the file is uncompressed. With lossless compression, every single bit of data that was originally in the file remains after the file is uncompressed. All of the information is completely restored. This is generally the technique of choice for text or spreadsheet files, where losing words or financial data could pose a problem. The Graphics Interchange File (GIF) is an image format used on the Web that provides lossless compression. On the other hand, lossy compression reduces a file by permanently eliminating certain information, especially redundant information. When the file is uncompressed, only a part of the original information is still there (although the user may not notice it). Lossy compression is generally used for video and sound, where a certain amount of information loss will not be detected by most users. The JPEG image file, commonly used for photographs and other complex still images on the Web, is an image that has lossy compression. Using JPEG compression, the creator can decide how much loss to introduce and make a trade-off between file size and image quality.

Fetch Execute Cycle

Explain the Fetch Decode Execute cycle of CPU

Most modern processors work on fetch-decode-execute principle. This is also called Von Neumann Architecture.

When a set of instructions is to be executed, the instructions and data are loaded in main memory. The address of the first instruction is copied into the program counter. The execution of an instruction by a processor is divided in three parts. These parts are fetching, decode and execute.

1. Fetch instruction

In the first step, the processor fetches the instruction from the memory. The instruction is transferred from memory to instruction register.

In the following figure, the processor is ready to fetch instruction. The instruction pointer contains the address 0100 contains the instruction MOV AX, 0.

The memory places the instruction on the data bus. The processor then copies the instruction from the data bus to the instruction register.

2. Decode instruction

In this step, the instruction is decoded by the processor. The processor gets any operand if required by the instruction. For example, the instruction MOV AX, 0. Stores the value 0 in Ax register. The processor will fetch the constant value 0 from the next location in memory before executing the instruction.

In the above figure, the processor transfers the instruction from instruction register to the decode unit. The instruction tells the computer to store 0 into AX register. The decode unit now has all the details of how to do this.

3. Execute instruction

In the last phase, the processor execute the instruction, it stores 0 in register AX.

In above figure, the processor execute the instruction MOV AX, 0. Finally it adjusts the instruction pointer to point to next instruction to be executed stored at address 0102.

What are ports? Differentiate between serial and parallel ports.

A port is an interface or point of attachment. It is used to connect peripheral devices with computer such as printers, keyboards or mouse. Each type of port operates at a certain speed. The speed is measured in kilobits per second (kbps) or megabits per second (Mbps).

Types of ports

Different types of ports are as follows:

1. Serial ports

A type of interface that transmits one bit at a time is called serial port. It is usually used to connect devices that do not require fast data transmission like mouse and keyboard etc. Serial ports are often known as communications (COM) ports. Data travels over a serial port at 115 kilobits per second.

2. Parallel ports

A type of interface that transmits many nits at a time is called parallel port. It is used to connect devices that transfer many bits at a time and require fast data transmission like printer and scanner etc. parallel ports are often referred to as line printer (LPT) ports. The speed of parallel ports is 12Mbps.

Monday, November 24, 2014

Computer Ethics


Computer Misuse Act

You need to be familiar with the following ideas about data and computer misuse: that data stored electronically is easier to misuse; that software should not be copied without permission; the consequences of software piracy; that hacking can lead to corruption of data, either accidentally or on purpose.

Types of computer misuse

Misuse of computers and communications systems comes in several forms:

Hacking

Hacking is where an unauthorised person uses a network, Internet or modem connection to gain access past security passwords or other security to see data stored on another computer. Hackers sometimes use software hacking tools and often target, for example, particular sites on the Internet.

Data misuse and unauthorised transfer or copying

Copying and illegal transfer of data is very quick and easy using online computers and large storage devices such as hard disks, memory sticks and DVDs. Personal data, company research and written work, such as novels and textbooks, cannot be copied without the copyright holder's permission.

Copying and distributing copyrighted software, music and film

This includes copying music and movies with computer equipment and distributing it on the Internet without the copyright holder's permission. This is a widespread misuse of both computers and the Internet that breaks copyright regulations.

Email and chat room abuses

Internet services such as chat rooms and email have been the subject of many well-publicised cases of impersonation and deception where people who are online pretend to have a different identity. Chat rooms have been used to spread rumours about well known personalities. A growing area of abuse of the Internet is email spam, where millions of emails are sent to advertise both legal and illegal products and services.

Pornography

A lot of indecent material and pornography is available through the Internet and can be stored in electronic form. There have been several cases of material, which is classified as illegal, or which shows illegal acts, being found stored on computers followed by prosecutions for possession of the material.

Identity and financial abuses

This topic includes misuse of stolen or fictional credit card numbers to obtain goods or services on the Internet, and use of computers in financial frauds. These can range from complex well thought out deceptions to simple uses such as printing counterfeit money with colour printers.

Viruses

Viruses are relatively simple programs written by people and designed to cause nuisance or damage to computers or their files.

How to prevent computer misuse

The Computer Misuse Act (1990)
This was passed by Parliament and made three new offences:

  1. Accessing computer material without permission, eg looking at someone else's files.
  2. Accessing computer material without permission with intent to commit further criminal offences, eg hacking into the bank's computer and wanting to increase the amount in your account.
  3. Altering computer data without permission, eg writing a virus to destroy someone else's data, or actually changing the money in an account.
The Data Protection Act
This was introduced to regulate personal data. This helps to provide protection against the abuse of personal information.

1. Personal data shall be processed fairly and lawfully and, in particular,   shall not be processed unless-

2. Personal data shall be obtained only for one or more specified and lawful   purposes, and shall not be further processed in any manner incompatible    with that purpose or those purposes.

3. Personal data shall be adequate, relevant and not excessive in relation    to the purpose or purposes for which they are processed.

4. Personal data shall be accurate and, where necessary, kept up to date.

5.Personal data processed for any purpose or purposes shall not be kept for longer than is necessary for that purpose or those purposes.

6. Personal data shall be processed in accordance with the rights of data subjects under this Act.

7. Appropriate technical and organisational measures shall be taken against un-authorised or unlawful processing of personal data and against accidental loss or destruction of, or damage to, personal data.

Copyright law
This provides protection to the owners of the copyright and covers the copying of written, musical, or film works using computers. FAST is the industry body which is against software theft. You can find out more about it in the Copyright section.

There have been cases where laws such as Copyright have been used to crack down on file sharing websites or individuals who store and illegally distribute copyrighted material, eg music. There is a massive problem with many people around the world obtaining copyrighted material illegally.

Close down chat rooms
Some chat rooms have been closed down due to abuses, especially where children are vulnerable. Some have moderators who help to prevent abuses. Advice about sensible use is important; especially to never give personal contact details or arrange meetings without extreme caution.

Reduce email spamming
This may be reduced by:
  • never replying to anonymous emails
  • setting filters on email accounts
  • reporting spammers to ISPs, who are beginning to get together to blacklist email abusers
  • governments passing laws to punish persistent spammers with heavy fines
Regular backups and security
Just making something illegal or setting up regulations does not stop it happening. Responsible computer users need to take reasonable steps to keep their data safe. This includes regular backups and sufficient security with passwords.

Computer Systems (FAST TRACK)

1     Data representation   1.1    Number systems   How and why computers use binary to represent all forms of data? •     Any form ...