Friday, July 24, 2009

PExam - Fixed Iteration

( Sir, sorry po late nkapost nghintay po kasi ako sa retrieved password ko sa blog..ng forgot password po kasi ako kasi di ma-open kanina..sorry po late)

CODE:
f=inline(' 1/(x+1) ');
fa=inline(' x^2+x+1 ');
delta=10^-10;
ya=1;
n=100;
disp('iteration a ya b ');
%ya=a;
for k=1:n

a=ya;
ya=feval(f,a)
b=a-ya;


d= [k,a,ya,b];
disp(d);
if abs(b)< delta,break,end
end


OUTPUT:
iteration a ya b

ya =

0.5000

1.0000 1.0000 0.5000 0.5000

ya =

0.6667

2.0000 0.5000 0.6667 -0.1667

ya =

0.6000

3.0000 0.6667 0.6000 0.0667

ya =

0.6250

4.0000 0.6000 0.6250 -0.0250

ya =

0.6154

5.0000 0.6250 0.6154 0.0096

ya =

0.6190

6.0000 0.6154 0.6190 -0.0037

ya =

0.6176

7.0000 0.6190 0.6176 0.0014

ya =

0.6182

8.0000 0.6176 0.6182 -0.0005

ya =

0.6180

9.0000 0.6182 0.6180 0.0002

ya =

0.6181

10.0000 0.6180 0.6181 -0.0001

ya =

0.6180

11.0000 0.6181 0.6180 0.0000

ya =

0.6180

12.0000 0.6180 0.6180 -0.0000

ya =

0.6180

13.0000 0.6180 0.6180 0.0000

ya =

0.6180

14.0000 0.6180 0.6180 -0.0000

ya =

0.6180

15.0000 0.6180 0.6180 0.0000

ya =

0.6180

16.0000 0.6180 0.6180 -0.0000

ya =

0.6180

17.0000 0.6180 0.6180 0.0000

ya =

0.6180

18.0000 0.6180 0.6180 -0.0000

ya =

0.6180

19.0000 0.6180 0.6180 0.0000

ya =

0.6180

20.0000 0.6180 0.6180 -0.0000

ya =

0.6180

21.0000 0.6180 0.6180 0.0000

ya =

0.6180

22.0000 0.6180 0.6180 -0.0000

ya =

0.6180

23.0000 0.6180 0.6180 0.0000

ya =

0.6180

24.0000 0.6180 0.6180 -0.0000

ya =

0.6180

25.0000 0.6180 0.6180 0.0000

Thursday, August 30, 2007

CSCI01 Exercise

MICROPROCESSOR
(A microprocessor is a programmable digital electronic component that incorporates the functions of a central processing unit (CPU) on a single semiconducting integrated circuit (IC). The microprocessor was born by reducing the word size of the CPU from 32 bits to 4 bits, so that the transistors of its logic circuits would fit onto a single part. One or more microprocessors typically serve as the CPU in a computer system, embedded system, or handheld device.)


CISC

Pronounced sisk, and stands for Complex Instruction Set Computer. Typically CISC chips have a large amount of different and complex instructions. The philosophy behind it is that hardware is always faster than software, therefore one should make a powerful instructionset, which provides programmers with assembly instructions to do a lot with short programs.


RISC

Pronounced risk, and stands for Reduced Instruction Set Computer. The philosophy behind it is that almost no one uses complex assembly language instructions as used by CISC, and people mostly use compilers which never use complex instructions. RISC chips require fewer transistors, which makes them easier to design and cheaper to produce.



MEMORY CHIPS

~ Kinds of Memory Chips ~


SIMMS

SIMM stands for Single In-Line Memory Module. With SIMMs, memory chips are soldered onto a modular printed circuit board (PCB), which inserts into a socket on the system board.


DIMMS

Dual In-line Memory Modules, or DIMMs, closely resemble SIMMs. Like SIMMs,
most DIMMs install vertically into expansion sockets. The principal difference
between the two is that on a SIMM, pins on opposite sides of the board are "tied
together" to form one electrical contact; on a DIMM, opposing pins remain electrically
isolated to form two separate contacts.


SO DIMMS

A type of memory commonly used in notebook computers is called SO DIMM or
Small Outline DIMM. The principal difference between a SO DIMM and a DIMM is
that the SO DIMM, because it is intended for use in notebook computers, is
significantly smaller than the standard DIMM.


RIMMS AND SO-RIMMS

RIMM is the trademarked name for a Direct Rambus memory module. RIMMs look
similar to DIMMs, but have a different pin count. RIMMs transfer data in 16-bit chunks.
The faster access and transfer speed generates more heat. An aluminum sheath, called
a heat spreader, covers the module to dissipate heat and protect the chips from
overheating.



EXPANSION SLOTS
( Expansion slots are located on the motherboard, and openings on the back of the computer allow the ports on the cards that go in the slots to be accessed. )

Types of Expansion Slots:
ISA
AGP
PCI
PCIe, which is short for PCIexpress


ISA Slots

ISA slots are an older type of expansion slot, twice as big as PCI slots and slower than PCI slots as well. ISA slots are usually black, while PCI slots are usually white. ISA slots are not used much anymore, but most computers still have at least one of them.
ISA networking cards, ISA sound cards, ISA video cards, and other types of ISA expansion cards can be used in the ISA slots.

PCI Slots

PCI slots can handle 64 bits of data at a time, twice as fast as ISA slots, which can only handle 32 bits of data at a time. PCI is an abbreviation for "Peripheral Component Interconnect." A 64-bit PCI slot has 64 connections to the motherboard, and each connection is capable of handling 1 bit of data at a time. A 32-bit ISA slot has 32 connections to the motherboard, each handling one bit of data at a time.

AGP Slots

The AGP expansion slot connects AGP video cards to the motherboard. AGP is an abbreviation for Accelerated Graphics Port. Most AGP video cards are capable of a higher data transfer rate than PCI video cards. Video cards, like the one shown above, simply plug into an AGP slot and connect a monitor or other video display device to a computer, usually through the VGA port.

PCI express

PCI Express is a new technology that is slowly replacing AGP. PCI Express x16 slots can transfer data at 4GBs per second, which is about twice as fast as an AGP 8x slot! PCIe stands for PCI Express, or PCIexpress. PCI Express slots come in five different sizes and speeds: PCIe x1, PCIe x2, PCIe x4, PCIe x8, and PCIe x16. PCIe x16 slots are used for graphics cards.



BUS ARCHITECTURE
The internal structure of a PC—the way components such as the CPU and the system bus relate to each other—is referred to as the architecture of the system.
Traditional microcomputer architecture has an internal bus that links the CPU with RAM, and an external bus that allows input/output and storage devices to connect to the system bus via expansion slots.

The bus system can be divided into three major components or groups of signals:
Data Bus Lines
Address Bus Lines
Control Bus Lines

It is important to note that the bus signals are used throughout the motherboard and are also available at the expansion slots.


Data Bus

The Data bus is simply a set of electrical lines that allow the CPU to move binary information (logic signals) to or from any part of the system components. For example, data can be transferred from memory to the Disk I/O interface via the data lines.
The number of data lines is determined the type of CPU being used.

Address Bus

The CPU runs programs (instructions and data) that are stored in memory.
The more memory a system has, the greater the flexibility of the system in running large programs and data manipulations.
Memory is configured in such a way that each group of 8 bits (one byte) has a unique location value. This location value is generally referred to as the memory address.

Control Bus

The control bus enables the CPU to monitor and maintain control of the events that occur on the Address and Data Buses.
All events that occur on the Buses are timed by a very stable clock circuit. For example, consider the case where the CPU needs to write data to memory. The basic sequence of events may be as follows:
CPU accesses the memory location by placing the address on the Address Bus.
CPU puts data on the Data Bus.
CPU selects the memory chips to be written to.
CPU activates the 'write' signal on the Control Bus.

Wednesday, August 22, 2007

PF-exer1

HARD DRIVE
(is a non-volatile storage device which stores digitally encoded data on rapidly rotating platters with magnetic surfaces.)
The Platter
A hard disk platter (or disk) is a component of a hard disk drive: it is the circular disk on which the magnetic data are stored. The rigid nature of the platters in a hard drive is what gives them their name (as opposed to the flexible materials which are used to make floppy disks). Hard drives typically have several platters which are mounted on the same spindle.
Spindle and Spindle Motor
The spindle motor, also sometimes called the spindle shaft, is responsible for turning the hard disk platters, allowing the hard drive to operate. The spindle motor is sort of a "work horse" of the hard disk. It's not flashy, but it must provide stable, reliable and consistent turning power for thousands of hours of often continuous use, to allow the hard disk to function properly. In fact, many drive failures are actually failures with the spindle motor, not the data storage systems.
A spindle is the axis on which the platters of a computer hard disk spin. Database performance can be improved by spindling, the action of mounting data files and index files on different hard disks so that contention for read or write resources is diminished.
The Read-Write Head
Disk read/write heads are mechanisms that read data from or write data to disk drives. The heads have gone through a number of changes over the years.
The Head Actuator
The actuator is the device used to position the head arms to different tracks on the surface of the platter (actually, to different cylinders, since all head arms are moved as a synchronous unit, so each arm moves to the same track number of its respective surface). The actuator is a very important part of the hard disk, because changing from track to track is the only operation on the hard disk that requires active movement: changing heads is an electronic function, and changing sectors involves waiting for the right sector number to spin around and come under the head (passive movement).
Ribbon Cable
A ribbon cable (also known as multi-wire planar cable) is a cable with many conducting wires running parallel to each other on the same flat plane. As a result the cable is wide and flat rather than round. Its name comes from the resemblance of the cable to a piece of ribbon (which is likewise wide and flat).
Base Casting
The bottom of the disk is often called the base casting, the name coming from the manufacturing process used to create the single piece of aluminum from which it is normally made. The drive mechanics are placed into the base casting, and another piece of usually aluminum is placed on top to enclose the heads and platters.
MOTHERBOARD
(is the central or primary circuit board making up a complex electronic system, such as a modern computer.)
IDE Connector
Most motherboards have two IDE connectors, which allow two drives to be attached to each connector. One drive is set to master and the other drive is set to slave by using a jumper that is normally located on the back of the drive. This allows a total of four IDE devices, (or drives), to be attached to a typical computer.
Processor Socket
is widely used to describe the connector linking the motherboard to the CPU(s) in certain types of desktop and server computers, particularly those compatible with the Intel x86 architecture.
PCI
The Peripheral Component Interconnect, or PCI Standard (in practice almost always shortened to PCI), specifies a computer bus for attaching peripheral devices to a computer motherboard. These devices can take any one of the following forms:
An integrated circuit fitted onto the motherboard itself, called a planar device in the PCI specification.
An expansion card that fits into a socket.
AGP
The Accelerated Graphics Port (also called Advanced Graphics Port, often shortened to AGP) is a high-speed point-to-point channel for attaching a graphics card to a computer's motherboard, primarily to assist in the acceleration of 3D computer graphics. AGP is often referred to as a 'bus'; however, this is a misnomer - a single AGP controller is only capable of controlling a single device.
SATA
Serial ATA is a computer bus primarily designed for transfer of data between a computer and storage devices (like hard disks or optical drives).
The main benefits are thinner cables that let air cooling work more efficiently, faster transfers, ability to remove devices while operating (Hot swapping), and more reliable operation with tighter data integrity checks.
South Bridge
The south bridge is often referred to as the I/O controller. The features of the south bridge change less often than the those of the north bridge. From chipset to chipset, nearly all south bridges have support for integrated sound, LAN and modem, ATA and USB.
Memory
Memory refer to computer components, devices and recording media that retain digital data used for computing for some interval of time. Computer storage provides one of the core functions of the modern computer, that of information retention.
MONITOR
(is a piece of electrical equipment which displays viewable images generated by a computer without producing a permanent record.)


SYSTEM UNIT

(The main part, processing unit and devices, of a microcomputer is a system unit.)

Motherboard

A Motherboard or system board is the main printed, flat circuit board in an electronic device such as microcomputers. The board contains expansion slots (sockets) that accept additional boards (expansion Cards).

Microprocessor

A microprocessor is a processor whose elements are miniaturized into one or a few integrated circuits contained in a single silicon microchip. It executes instructions.

Memory Chip

A memory chip is a chip that holds programs and data either temporarily or permanently. The major categories of memory chips are RAMs and ROMs.

System Clock

The clock is a device that generates periodic, accurately spaced signals used for several purposes such as regulation of the operations of a processor or generation of interrupts.

Ports

A port is an external connecting socket on the outside the computer. This is a pathway into and out of the computer. A port lets users plug in outside peripherals, such as monitors, scanners and printers.

Buses

A bus is a data pathway between several hardware components inside or outside a computer. It not only connects the parts of the CPU to each other, but also links the CPU with other important hardware.

Expansion Slots

Expansion slots are receptacles inside a system unit that printed circuit boards (expansion boards)are plugged into. Computer buyers need to look at the number of expansion slots when they buy a computer, because the number of expansion slots decides future expansion.

KEYBOARD

(is a peripheral partially modelled after the typewriter keyboard. Keyboards are designed for the input of text and characters and also to control the operation of a computer.)


Tuesday, July 24, 2007

Major Components of a Computer System

HARDWARE

Computer hardware is the physical part of a computer, including the digital circuitry, as distinguished from the computer software that executes within the hardware. The hardware of a computer is infrequently changed, in comparison with software and data, which are "soft" in the sense that they are readily created, modified or erased on the computer. Firmware is a special type of software that rarely, if ever, needs to be changed and so is stored on hardware devices such as read-only memory (ROM) where it is not readily changed (and is, therefore, "firm" rather than just "soft").

SOFTWARE

Computer software, consisting of programs, enables a computer to perform specific tasks, as opposed to its physical components (hardware) which can only do the tasks they are mechanically designed for. The term includes application software such as word processors which perform productive tasks for users, system software such as operating systems, which interface with hardware to run the necessary services for user-interfaces and applications, and middleware which controls and co-ordinates distributed systems.

PEOPLEWARE

It is the term which actually used to name the people behind the softwares and hardwares. They can be also the programmers, technicians, or the ones who's using the computers.

Thursday, July 19, 2007

CSCI01- EF Prelim Exam




I'm Jemimah Pamela A. Goc-ong. I'm 17 years of age living at Green Meadows Subd. Tugbok Dist. Mintal, Davao City. I was born on March 23, 1990 in the land of promise- Davao. Everyone call me -jemz-, so you can call me like that too. My parents are Leo Goc-ong and Rose Goc-ong. I only have one sibling and she's a girl. Her name is Keziah Mae.

Most first impression of people to me is that I am not friendly and "masungit". But I'm not. I am friendly and I love to have a lot of friends around me willing to help me in the times I needed them most. I love to surf the net and play online games together with Jessa, Lala and Cris. Others tell me that I'm intelligent but I'm not like that. I just study the things that was discussed and that's it! My score depends on my luck! Hahahaha..^^

When I was in my elementary years, I was studying in DCLC and MILC. In my high school years, I was in DRANHS and for now, still in my college years, I'm pursuing BS Computer Engineering in AMACC Davao. I want to be a successful computer engineer someday working abroad to earn money and give some to my family. I have a lot of dreams to achieve and for now, all I can do is to study hard and get high grades!


____C++ Code and It's Output____

# include
#include
main()
{
int wat, a;
float far;
printf("Enter temperature in Celcius:");
scanf("%d", &a);
far=9*a/5+32;
wat=a+273;
printf("\n\nFahrenheit=%.2f", far);
printf("\n\nKelvin=%d", wat);
getch();
}

OUTPUT

Enter temperature in Celcius: 25

Fahrenheit: 77.00

Kelvin: 298

Tuesday, July 17, 2007

Computer Hardware and Software

Computer software, consisting of programs, enables a computer to perform specific tasks, as opposed to its physical components (hardware) which can only do the tasks they are mechanically designed for. The term includes application software such as word processors which perform productive tasks for users, system software such as operating systems, which interface with hardware to run the necessary services for user-interfaces and applications, and middleware which controls and co-ordinates distributed systems.

Computer hardware is the physical part of a computer, including the digital circuitry, as distinguished from the computer software that executes within the hardware. The hardware of a computer is infrequently changed, in comparison with software and data, which are "soft" in the sense that they are readily created, modified or erased on the computer. Firmware is a special type of software that rarely, if ever, needs to be changed and so is stored on hardware devices such as read-only memory (ROM) where it is not readily changed (and is, therefore, "firm" rather than just "soft").

Exercise 2

COMPUTER SYSTEM- is a combinatin of software and hardware

---HARDWARE---

__CPU- Central Processing Unit__
The processor chip that runs your computer.

__RAM- Random Access Memory__
The part of the computer that temporarily holds a program and related files and manipulates data (non permanent).

---PERIPHERALS---

INPUT DEVICES



__Keyboard__

Keyboards are designed for the input of text and characters and also to control the operation of a computer.

__Mouse__

A mouse functions as a pointing device by detecting two-dimensional motion relative to its supporting surface. Physically, a mouse consists of a small case, held under one of the user's hands, with one or more buttons.

__Scanner__

Scanner is a device that analyzes images, printed text, or handwriting, or an object (such as an ornament) and converts it to a digital image. Most scanners today are variations of the desktop (or flatbed) scanner.

OUTPUT DEVICES


__Monitor__

Monitor is a piece of electrical equipment which displays viewable images generated by a computer without producing a permanent record.

__Printer__

Printer produces a hard copy (permanent human-readable text and/or graphics) of documents stored in electronic form, usually on physical print media such as paper or transparencies.

__Speakers__

Speakers are external speakers, commonly equipped with a low-power internal amplifier. The standard audio connection is a 3.5mm (1/8 inch) stereo jack plug often colour-coded lime green, following the PC 99 standard) for computer sound cards.

STORAGE DEVICES



__Hard Drive__

Hard drive a non-volatile storage device which stores digitally encoded data on rapidly rotating platters with magnetic surfaces.

__Floppy Drive__

__Zip Drive__

Zip drive is a medium-capacity removable disk storage system, introduced by Iomega in late 1994. Originally it had a capacity of 100 MB, but later versions increased this to first 250 MB and then 750 MB.

__CD-ROM__

CD-ROM is a Compact Disc that contains data accessible by a computer. While the Compact Disc format was originally designed for music storage and playback, the format was later adapted to hold any form of binary data. CD-ROMs are popularly used to distribute computer software, including games and multimedia applications, though any data can be stored (up to the capacity limit of a disc).