Monday, September 25, 2006

EXAMINATION

Hello to Everyone! We will be having our exam on the first week of October ( Oct 2-7 ).
The exam items will be taken from this blogsite and from your exercises.

By the way, I commend section K4L: You were, by far, the most enjoyable and enthusiastic class that I have handled this semester.

For the others, I also enjoyed your company (with an unsignificant number of exceptions), Please do well in your blogsites. This is where I say byebye =)

Sunday, March 19, 2006

HTML

Go here: http://www.pageresource.com/html/index2.htm

Writer and Calc Tutorials

Go here : http://training.bytebot.net/

Boolean Algebra

Number Systems

CSTC Banner
CSTC home --> browse resources --> cover page --> content
Conversion Between Different Number Systems

Positional number systems

Our decimal number system is known as a positional number system, because the value of the number depends on the position of the digits. For example, the number 123 has a very different value than the number 321, although the same digits are used in both numbers.

(Although we are accustomed to our decimal number system, which is positional, other ancient number systems, such as the Egyptian number system were not positional, but rather used many additional symbols to represent larger values.)

In a positional number system, the value of each digit is determined by which place it appears in the full number. The lowest place value is the rightmost position, and each successive position to the left has a higher place value.

In our decimal number system, the rightmost position represents the "ones" column, the next position represents the "tens" column, the next position represents "hundreds", etc. Therefore, the number 123 represents 1 hundred and 2 tens and 3 ones, whereas the number 321 represents 3 hundreds and 2 tens and 1 one.

The values of each position correspond to powers of the base of the number system. So for our decimal number system, which uses base 10, the place values correspond to powers of 10:

... 1000 100 10 1
... 10^3 10^2 10^1 10^0

Converting from other number bases to decimal

Other number systems use different bases. The binary number system uses base 2, so the place values of the digits of a binary number correspond to powers of 2. For example, the value of the binary number 10011 is determined by computing the place value of each of the digits of the number:

1 0 0 1 1 the binary number
2^4 2^3 2^2 2^1 2^0 place values

So the binary number 10011 represents the value

(1 * 2^4) + (0 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0)
= 16 + 0 + 0 + 2 + 1
= 19

The same principle applies to any number base. For example, the number 2132 base 5 corresponds to

2 1 3 2 number in base 5
5^3 5^2 5^1 5^0 place values

So the value of the number is

(2 * 5^3) + (1 * 5^2) + (3 * 5^1) + (2 * 5^0)
= (2 * 125) + (1 * 25) + (3 * 5) + (2 * 1)
= 250 + 25 + 15 + 2
= 292

Converting from decimal to other number bases

In order to convert a decimal number into its representation in a different number base, we have to be able to express the number in terms of powers of the other base. For example, if we wish to convert the decimal number 100 to base 4, we must figure out how to express 100 as the sum of powers of 4.

100 = (1 * 64) + (2 * 16) + (1 * 4) + (0 * 1)
= (1 * 4^3) + (2 * 4^2) + (1 * 4^1) + (0 * 4^0)
Then we use the coefficients of the powers of 4 to form the number as represented in base 4:
100 = 1 2 1 0 base 4

One way to do this is to repeatedly divide the decimal number by the base in which it is to be converted, until the quotient becomes zero. As the number is divided, the remainders - in reverse order - form the digits of the number in the other base.

Example: Convert the decimal number 82 to base 6:

82/6 = 13 remainder 4
13/6 = 2 remainder 1
2/6 = 0 remainder 2

The answer is formed by taking the remainders in reverse order: 2 1 4 base 6

1.5 Binary arithmetic
Converting hexadecimal to decimalNegative numbers

Addition

Binary addition follows the same rules as decimal addition.

Working from the right:
213 246
+ 142 + 127
355 373

If the sum of 2 digits produces a 2 digit result, the digit on the right is written down and the digit on the left is added to the next column to the left.

Decimal addition carry the ten example

The hardest part is remembering to think in binary.

The rules for binary arithmetic are shown in the table below.

0 + 0 = 0
1 + 0 = 1
1 + 1 = 10
1 + 1 + 1 = 11

When a value is represented using sign and magnitude, the left hand bit, the most significant bit, is used solely to determine the sign of the number.

most significant bit = 1 negative number
most significant bit = 0 positive number

For example:
1010 = -2
0010 = +2

This means that a 4-bit number cannot represent any value greater than 7 because the 4th bit is used to indicate the sign. However the 4 bits can still represent 15 different values when the negative numbers are included. These values are:
-7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4 , 5, 6, 7

If there was no sign bit, 4 bits would represent the following 16 values:
0, 1, 2, 3, 4, 5 , 6, 7, 8, 9, 10, 11, 12, 13, 14, 15


Question
Can you work out why there are only 15 values when you use sign and magnitude but 16 when there is no sign bit?
Answer

If you write out all the values for both representations, you'll see that there are two different versions of zero in sign and magnitude (0 = 0000 and -0 = 1000). These mean exactly the same.

This is one of the reasons why two's complement is used instead of sign and magnitude.

Decimal arithmetic uses different operations for addition and subtraction. Using two's complement, subtraction is carried out using the machine operation for addition. This system works for bit strings of any length. The examples given will use 8 or 4-bit strings for simplicity but a working PC is likely to use 32 or 64-bit strings. The first bit is again used to indicate a negative value but it also bears the position value.

The two's complement number 1000 1010 is evaluated as follows:
1000 1010
= -128 +0+0+0+8+0+2+0
= -118

Converting a number to its negative form is a two stage process:

1. complement (invert) all the bits (the result at this stage is known as one's complement).
2. add 1.

If you're working with 8-bit strings all values must appear as 8 bits and the possible values will be in the range -128 to 127.

Example 1 - Using a 4-bit binary string

To convert 1101 (1310) to its negative:


.write the number in 8 bit format 0000 1101
invert the bits 1111 0010
add 1 0000 0001
1111 0011

It is easy to check the answer:
1111 0011
= -128 +64 +32 +16 +0 +0 +2 +1
= -128 + 115
= -13

Activity Simulation of 4-bit number conversion to two's complement

The table below shows the two's complement representation of the range -8.. + 7

Decimal Binary two's complement representation
7 0111
6 0110
5 0101
4 0100
3 0011
2 0010
1 0001
0 0000
-1 1111
-2 1110
-3 1101
-4 1100
-5 1011
-6 1010
-7 1001
-8 1000

When 1 is added to the binary representation for -1 the result is a 5 bit number. Because the machine has only allocated 4 bits, the 5th bit is ignored as overflow. Adding one to any number leads to a continuous cycle of 4 bit numbers. The mileometer in a car works in the same way.
1111
+ 0001
1 0000

The processor treats subtraction like the addition of a negative number.

A - B = A + (-B)

All examples will be shown using 8 bit two's complement strings.

Subtraction is a 3 stage process:

1. invert the number to be subtracted;
2. add 1;
3. perform addition.

Example 1 - Subtraction of 19 from 53

To evaluate 53 - 19

Step 1 19 0001 0011
invert 1110 1100
Step 2 add 1 0000 0001
1110 1101

Step 3 add 53 and -19 0011 0101
1110 1101
1 0010 0010

The bit on the left is overflow and is not included in the result. So the result of 53 - 19 = 0010 0010.

You should always check the answer by converting it to decimal.
0010 0010 32 + 2 = 34
53 - 19 = 34

SCHOLAR Heriot-Watt University
searchsearchdiscussiondiscussionFAQFAQreportsreportsActivities in unit 1 Activities in unit 1 Heriot-Watt University
Open Topic Outline SCHOLAR : Computing : 1 Data representation and number systems :
Heriot-Watt University
metadata1.6 Fixed Point Numbers
SubtractionFloating Point Numbers

Fixed point numbers are used, for example, when a set of data values is defined as currency. This would mean that each number would have 2 positions after the decimal point. Fixed point calculations are performed very quickly.
Look at the animation below which illustrates how a decimal number is converted to binary.

You know how to represent positive integers (whole numbers) in binary. Extending the logic to include fixed point numbers is straightforward.

24 23 22 21 20 . 2-1 2-2 2-3
16 8 4 2 1 .
1 0 1 . 1 1 0


= 7.7510

Moving from left to right each position value is achieved by dividing the one on its left by two.

Example 1

Convert 0.375 to binary

24 23 22 21 20 . 2-1 2-2 2-3
16 8 4 2 1 .
0 . 0 1 1

= 0.375

1. Find the largest position value that is less than 0.375 (in this case 0.25);

2. Subtract 0.25 from 0.375 to give ;

3. Put a 1 in the 2-3 position;

4. Put 0 in the other columns.


IT 1 Reviewer

Exer 1:
Hardware

The hardware are the parts of computer itself including the Central Processing Unit (CPU) and related microchips and micro-circuitry, keyboards, monitors, case and drives (floppy, hard, CD, DVD, optical, tape, etc...). Other extra parts called peripheral components or devices include mouse, printers, modems, scanners, digital cameras and cards (sound, colour, video) etc... Together they are often referred to as a personal computers or PCs.

Central Processing Unit (CPU) - Though the term relates to a specific chip or the processor a CPU's performance is determined by the the rest of the computers circuitry and chips.

Currently the Pentium chip or processor, made by Intel, is the most common CPU though there are many other companies that produce processors for personal computers. One example is the CPU made by Motorola which is used in Apple computers.

With faster processors the clock speed becomes more important. Compared to some of the first computers which operated at below 30 megahertz (MHz) the Pentium chips began at 75 MHz in the late 1990's. As of mid 2003 speeds now exceed 3000+ MHz or 3 gigahertz (GHz) (check your local computer store for the latest speed). It depends on the circuit board that the chip is housed in, or the motherboard, as to whether you are able to upgrade to a faster chip. The motherboard contains the circuitry and connections that allow the various component to communicate with each other.

Though there were many computers using many different processors previous to this I call the 80286 processor the advent of home computers as these were the processors that made computers available for the average person. Using a processor before the 286 involved learning a proprietary system and software. Most new software are being developed for the newest and fastest processors so it can be difficult to use an older computer system.

Keyboard - The keyboard is used to type information into the computer or input information. There are many different keyboard layouts and sizes with the most common for Latin based languages being the QWERTY layout (named for the first 6 keys). The standard keyboard has 101 keys. Notebooks have embedded keys accessible by special keys or by pressing key combinations (CTRL or Command and P for example). Ergonomically designed keyboards are designed to make typing easier.

Some of the keys have a special use. There are referred to as command keys. The 3 most common are the Control or CTRL, Alternate or Alt and the Shift keys though there can be more (the Windows key for example or the Command key). Each key on a standard keyboard has one or two characters. Press the key to get the lower character and hold Shift to get the upper.

Disk Drives - All disks need a drive to get information off - or read - and put information on the disk - or write. Each drive is designed for a specific type of disk whether it is a CD, DVD, hard disk or floppy. Often the term 'disk' and 'drive' are used to describe the same thing but it helps to understand that the disk is the storage device which contains computer files - or software - and the drive is the mechanism that runs the disk.Mouse

Mouse - Most modern computers today are run using a mouse controlled pointer. Generally if the mouse has two buttons the left one is used to select objects and text and the right one is used to access menus. If the mouse has one button (Mac for instance) it controls all the activity and a mouse with a third buttons can be used by specific software programs.

One type of mouse has a round ball under the bottom of the mouse that rolls and turns two wheels which control the direction of the pointer on the screen. Another type of mouse uses an optical system to track the movement of the mouse.

Note: It is important to clean the mouse periodically, particularly if it becomes sluggish. A ball type mouse has a small circular panel that can be opened, allowing you to remove the ball. Lint can be removed carefully with a tooth pick or tweezers and the ball can be washed with mild detergent. A build up will accumulate on the small wheels in the mouse. Use a small instrument or finger nail to scrape it off taking care not to scratch the wheels. Track balls can be cleaned much like a mouse and touch-pad can be wiped with a clean, damp cloth. An optical mouse can accumulate material from the surface that it is in contact with which can be removed with a finger nail or small instrument.

Monitors - The monitor shows information on the screen when you type. This is called outputting information. When the computer needs more information it will display a message on the screen, usually through a dialog box. Monitors come in many types and sizes from the simple monochrome (one colour) screen to full colour screens.

Most desktop computers use a monitor with a cathode tube and most notebooks use a liquid crystal display (LCD) monitor.

To get the full benefit of today's software with full colour graphics and animation, computers need a color monitor with a display or graphics card.

Printers - The printer takes the information on your screen and transfers it to paper or a hard copy. There are many different types of printers with various levels of quality. The three basic types of printer are; dot matrix, inkjet, and laser.

  • Dot matrix printers work like a typewriter transferring ink from a ribbon to paper with a series or 'matrix' of tiny pins.

  • Ink jet printers work like dot matrix printers but fires a stream of ink from a cartridge directly onto the paper.

  • Laser printers use the same technology as a photocopier using heat to transfer toner onto paper.

Modem - A modem is used to translate information transferred through telephone lines or cable.

The term stands for modulate and demodulate which changes the signal from digital, which computers use, to analog, which telephones use and then back again. A high speed connection also requires a modem but because the information is transferred digitally it isn't required to change the signal from digital to analog but is used to create the connection between your computer and the computer you are connecting with.

Modems are measured by the speed that the information is transferred. The measuring tool is called the baud rate. Originally modems worked at speeds below 2400 baud but today analog speeds of 56,000 are common. Cable, wireless or digital subscriber lines (DSL) modems can transfer information much faster with rates of 300,000 baud and up.

Modems also use Error Correction which corrects for transmission errors by constantly checking whether the information was received properly or not and Compression which allows for faster data transfer rates. Information is transferred in packets. Each packet is checked for errors and is re-sent if there is an error.

Anyone who has used the Internet has noticed that at times the information travels at different speeds. Depending on the amount of information that is being transferred the information will arrive it's destination at different times. The amount of information that can travel through a line is limited. This limit is called bandwidth.

There are many more variables involved in communication technology using computers, much of which is covered in the section on the Internet.

Scanners- Scanners allow you to transfer pictures and photographs to your computer. A scanner 'scans' the image from the top to the bottom, one line at a time and transfers it to the computer as a series of bits or a bitmap. You can then take that image and use it in a paint program, send it out as a fax or print it. With optional Optical Character Recognition (OCR) software you can convert printed documents such as newspaper articles to text that can be used in your word processor. Most scanners use TWAIN software that makes the scanner accessable by other software applications.

Digital cameras allow you to take digital photographs. The images are stored on a memory chip or disk that can be transferred to your computer. Some cameras can also capture sound and video.

Case - The case houses the microchips and circuitry that run the computer. Desktop models usually sit under the monitor and tower models beside. They come in many sizes, including desktop, mini, midi, and full tower. There is usually room inside to expand or add components at a later time. By removing the cover off the case you will may find plate covered, empty slots that allow you to add cards. There are various types of slots including IDE, ASI, USB, PCI and Firewire slots.

Notebook computers may have room to expand depending on the type of computer. Most Notebooks also have connections or ports that allows expansion or connection to exterior, peripheral devices such as monitor, portable hard-drives or other devices.

Cards - Cards are components added to computers to increase their capability. When adding a peripheral device make sure that your computer has a slot of the type needed by the device.

Sound cards allow computers to produce sound like music and voice. The older sound cards were 8 bit then 16 bit then 32 bit. Though human ear can't distinguish the fine difference between sounds produced by the more powerful sound card they allow for more complex music and music production.
Colour cards allow computers to produce colour (with a colour monitor of course). The first colour cards were 2 bit which produced 4 colours [CGA]. It was amazing what could be done with those 4 colours. Next came 4 bit allowing for 16 [EGA and VGA ] colours Then came 16 bit allowing for 1064 colours and then 24 bit which allows for almost 17 million colours and now 32 bit is standard allowing monitors to display almost a billion separate colours.
Video cards allow computers to display video and animation. Some video cards allow computers to display television as well as capture frames from video. A video card with a digital video camera allows computers users to produce live video. A high speed or network connection is needed for effective video transmission.
Network cards allow computers to connect together to communicate with each other. Network cards have connections for cable, thin wire or wireless networks. For more information see the section on Networks.

Cables connect internal components to the Motherboard, which is a board with series of electronic path ways and connections allowing the CPU to communicate with the other components of the computer.

Memory - Memory can be very confusing but is usually one of the easiest pieces of hardware to add to your computer. It is common to confuse chip memory with disk storage. An example of the difference between memory and storage would be the difference between a table where the actual work is done (memory) and and a filing cabinet where the finished product is stored (disk). To add a bit more confusion, the computer's hard disk can be used as temporary memory when the program needs more than the chips can provide.

Random Access Memory or RAM is the memory that the computer uses to temporarily store the information as it is being processed. The more information being processed the more RAM the computer needs.

One of the first home computers used 64 kilobytes of RAM memory (Commodore 64). Today's modern computers need a minimum of 64 MB (recommended 128 MB or more) to run Windows or OS 10 with modern software.

RAM memory chips come in many different sizes and speeds and can usually be expanded. Older computers came with 512 KB of memory which could be expanded to a maximum of 640 KB. In most modern computers the memory can be expand by adding or replacing the memory chips depending on the processor you have and the type of memory your computer uses. Memory chips range in size from 1 MB to 512 MB. As computer technology changes the type of memory changes as well making old memory chips obsolete. Check your computer manual to find out what kind of memory your computer uses before purchasing new memory chips.

-------------------



Thursday, March 16, 2006

Revised Sample.c

#include

main(){
int a,b,c;
char name[20];
printf("\n May I know your name ? ");
scanf("%s", name);
printf("\n Hello %s", name);

printf("\n enter a;");
scanf("%d", &a);
printf("\n enter b:");
scanf("%d", &b);
c= a + b;
printf("The sum of %d and %d is %d", a, b, c);
}

Sample.c

this is the first version of Sample.c:

#include

main(){

char name[20];
printf("\n May I know your name ? ");
scanf("%s", name);
printf("\n Hello %s", name);

}

Sample.c

this is the first version of Sample.c:

#include

main(){

char name[20];
printf("\n May I know your name ? ");
scanf("%s", name);
printf("\n Hello %s", name);

}

Friday, March 03, 2006

Applying the blogskin to you blog


Naclick mo na kunyari yung Blogger Main, may lalabas na ganitong window...

Iclick mo yung Open With, tapos click mo ang OK...

May lalabas na text file na may codes na laman...
Select mo yung buong text file at i-copy mo using File->Edit->Copy, or Ctrl+C...

Tapos balik ka dun sa blogger acount mo...

Pagnaglog-on ka sa Blogger, mapupunta ka sa Dashboard... Yun ang Starting point mo lagi. Dun nakalagay lahat ng blog na ginawa mo. Since isa palang sa inyo, malamang isa lang nakalagay don. Pero sa case ko na maraming ginagawang blog, ang mga sumusunod ang lumabas:

Pointed to by the blue line ang blog of interest natin na Galbaldia. Pointed to by the Red line ang dapat nyong iclick na button (Change Settings)...


Pwede nyong baguhin don ang mga basic info na nakalagay sa blog pero may makikita kayo sa mga tab na "TEMPLATE".. Click that...

Makikita ninyo ang source code ng current blog nyo.. Papalitan natin yon kaya iselect ninyo lahat... Tapos Press the del key... Pag wala nang laman, Paste nyo naman yung code na kinopya natin kanina mula sa text file... Scroll down and Click on Save Template Changes...

Then, Click on Republish para maapply yung changes... and then...
Click on "View blog" ... and...

....

voila!.... Makikita nyo na na nagbago ang skin ng blog nyo :)

Mapapansin nyo, mejo gray ang text at maliit... babaguhin natin yan sa susunod natin na topic...

----------
Up next.... Editing your blogskin

Choosing a Skin

Para mabago ang itsura ng blog mo, pinakamadali at magandang paraan ang pagpili ng skin. Marami ring website ang nag-ooffer ng downloadable skin na pwede mong ipalit sa existing template mo. Pero para sa tutorial na to, gagamitin nating ang blogskins...

Go to www.blogskins.com

Pagnandun ka na, di mo na kailangan magregister...

Instead, i-type mo ang desired subject ng skin sa skin search box as shown below:

Depende sa'yo kung anong gusto mong i-type.
Kung mahilig ka sa puno... pwedeng "tree" ang i-type mo.. Sa ngayon, maghahanap palang ako ng blogskin para sa Galbaldia... Hmmm...

Maganda siguro kung techie ang dating ng skin diba? May napili akong skin na nagmamatch sa subject natin at sa kung ano ang outlook ko sa buhay...

Tinype ko ang "tech" sa search skins at lumabas yung mga listahan ng mga related skins...

Hinanap ko syempre yung may rating ng 5.0...
At meron akong particular na skin na nagustuhan... yung Raindrops25//not my home.. It suites my style and my outlook in life... Kaya yun ang gagamitin ko as an example

Click lang yung link at makikita mo ang information tungkol sa skin...


Parang ganito ang lalabas... Description palang yan ng
Skin.. Hindi pa yan yung preview... SO pano mo makikita ang preview ng skin mo ?


You have to scroll down until you see the section named "Actions" as shown in the next picture..

Pagnagscroll down kana, makikita mo yung link na "preview it" (pointed to by the red arrow).. Click mo yon para makita mo yung itsura nung skin... Ngayon nakikita nyo na yung itsura nung skin kaya di ko na ipapaste dito... Pag satisfied na kayo, press the back button and you're ready to get the BLOGSKIN CODE... Since para sa blogger ang kukunin nyong code, click on the "Blogger Main" link which is pointed to by the Yellow Arrow... :)




Up NEXT.... HOW TO APPLY YOUR CHOSEN SKIN TO YOUR BLOG...


Pano magregister sa blogger...

Nais ko sanang gumawa ng sarili kong version pero dahil may nakita akong mas maganda, puntahan nyo nalang ang site na ito:

http://preetamrai.com/webtopics/wiki_blog/02blog.htm

BLOGS

What is a blog?
Sabi ni pareng google, ang blog daw or weblog ay isang journal or newsletter kung saan madaling maupdate ang mga entries depende dun sa author. Intended daw ang karamihan ng mga blogs para sa public consumption... Kaya kung balak mong magdiary na walang makakakita, magsulat ka nalang sa papel o kaya sa computer mo... Pwede ka rin naman gumamit ng code names para di masyadong sensitive ang mga isusulat mo.. Pero kung mejo malakas talaga loob mo at you consider yourself to be an open book, then WELCOME to the Blogging world!

Technical Definition: (http://www.bytowninternet.com/glossary)
Blog is short for weblog. A weblog is a journal (or newsletter) that is frequently updated and intended for general public consumption. Blogs generally represent the personality of the author or the Web site.

Para sa isang magandang description tungkol sa blogging, punta kayo sa blogging101:
http://www.unc.edu/~zuiker/blogging101/index.html


Bago ka makapagblog, kelangan mo munang magsign up sa mga blog servers. Ang mga pinakasikat ngayon sa pilipinas ay ang blogger, ang xanga at live-journal. Pero marami pang ibang blog na available sa net

Para sa Tutorial na ito, ang gagamitin natin ay blogger... :)

PAUNAWA -------

I want this blog to be updated as often as possible kaya magTataglish na ako... Mahirap mag-edit ng grammar at mag-isip ng maraming english words na baka di rin maintindihan ng magbabasa... Since mga pilipino naman mga estudyante ko ... Ok na siguro to ;)... I'll just be releasing an english version of this blog some time in the future... pero sa ngayon, ganito muna... okey ? okey... :P

Welcome to Galbaldia

I decided to put all my posts about Information Technology here. Please feel free to suggest new topics so that I can share more info. Have fun reading :)