## tiistai 17. syyskuuta 2013

### Understanding binary codes

Binary that weird looking number line. It is actually very easy to understand how to calculate binaries. Normal binary consists of numbers one "1" and zero "0" and the number 1 means that the value is turned ON and if the number is 0 it means it is turned OFF.

We start from number one always multiplying it by two. We get numbers 1,2,4,8,16,32,64,128. Eight numbers. Then we make a table:

 0 0 0 0 0 0 0 0 1 2 4 8 16 32 64 128

Remember, 0 is OFF. 1 is ON. Now the binary is 0 because every number is turned off. Lets turn something on.

 0 1 0 1 0 0 0 0 1 2 4 8 16 32 64 128

Now two values are turned on, and guess what; just simply calculate the numbers together. Number two is ON so we have 2 and the number 8 is turned ON so we have numbers 2 and 8. 2 + 8 = 10. The binary value is ten. Simple as that.

 1 1 1 1 1 1 1 1 1 2 4 8 16 32 64 128

And if we turn everything on we have 1+2+4+8+16+32+64+128 = 255.

Now you should know how to calculate binary numbers. You can easily change IP address to binary form for example or vice versa.

## maanantai 9. syyskuuta 2013

### Internet Protocol Suite

In this post I'm trying to explain internet protocols. There are so many things related to internet protocols so it's not very easy to explain everything and I'm not even sure if I understand them.

Every computer needs IP address if you want it to connect somewhere. Without IP your computer can't access to network. When you plug in a network cable it usually works out of the box or if you are setting up a home network it's just plug and play. It's whole different story when setting up a company network. Well lets start from what I know. When setting up a home network your computer gets an IP address usually from the service operator.  You can check your ip configuration in Windows environment by opening CMD window and typing ipconfig /all or in Linux by typing ifconfig to terminal window.

Lets have a look at my ipconfig. In the description is the name of my network adapter.

Physical address means the same as MAC address. MAC address is your network adapter hardware number assigned in the factory. The number is unique and with MAC address your adapter can be identified in the network. For example if you want to boot 10 computers at the same time, you could get all the MAC numbers and then send a magic packet to the computers.

What is magic packet ? It means the same as Wake-On-Lan. Shortly it is a packet which is sent from computer to another in the network and when the other computer gets that packet it will turn on if it's powered off. This is useful for example if your server shuts down and you are far away, you could just send this packet and it would wake up.

DHCP - Dynamic Host Configuration Protocol
http://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol

IPv4

NAT were developed because engineers thought there would not be enough IP addresses in the future. For example you have one IP address and you want to connect 5 computers in the same address. All your computers have unique local IP address for example from 10.12.5.1 to 10.12.5.5 (1-5) If you open two computers and type to browser www.whatismyip.com it will show the same address for both computers for example 187.213.123.44 and why is that ? The NAT translates the local address to the IP which is same for all the computers.

This is not very clear to me so I just post a link to wikipedia.
http://en.wikipedia.org/wiki/Subnetwork

DNS
Domain name server or Domain name system. So all the computers operate with IP address. These addresses are very hard for human to remember. Just think about your cell phone. You have hundreds of phone numbers but you only remember the persons name you want to call. People like to name things. This is where DNS comes. It translates the computers IP address to a name that can be easily remembered. For example if I type into my browser www.vr.fi the dns sees that I'm trying to connect to an address and then forwards me to the server. Now to demonstrate this:

Lets open the cmd window again. Type ping www.vr.fi and it shows you the server IP address ! Now if you type this address to the browser http://188.117.35.8 you connect to www.vr.fi. Awesome. It is the same thing as telephone book. You type a name and then DNS resolves the server number you are trying to reach.

TCP/UDP
If you ever need to configure network routers you will walk into these. TCP is a stateful protocol. If you send a picture to your friend with email it probably uses TCP. TCP traffic always checks if the packet is sent to the destination computer. If not it will send it again until it success. TCP is used more often than UDP.

UDP is stateless protocol and packets are not checked. This uses less network lane and is useful for example in online games. It is not very necessary to check if the packet ended up in the server because games usually work so fast that it would be too late to resend that packet. And the data sent is not very "important" I would describe.

IMAP/POP3
These are the protocols for setting up email account. IMAP means that all the mails are kept in the server and loaded from there. It is usually handy to set up an IMAP mail account because then you can read your mails from multiple machines, for example laptop, mobile phone and from other computers.

POP3 means that all the mails are loaded from server to your local computer. Its advantage is that your mail server will never get full because all the mails are loaded to your computers hard drive. The disadvantage of this is that you can't read mails from other machines. Also if your hard drive somehow fails all your mails will be deleted with the drive.

To lean more about protocols see this very well written Wikipedia article!
http://en.wikipedia.org/wiki/Internet_protocol_suite

## keskiviikko 4. syyskuuta 2013

### How To Build A Computer From Scratch (Mini-ITX)

Building computer from parts is not very hard task. I'm going to show how it is done. Maybe in the next article we are going to look what kind of parts you should choose.

You will need:
- screwdriver
- scissors
- cable ties

1. Start with opening all the packages. Keep screws in good order and case manual + motherboard manual near.

2. Open your computer case and insert motherboard inside. Notice that you may have to screw bolts under the motherboard. Check that from your manuals. Don't be afraid the components won't broke easily. I even used magnetized screwdriver which you should never use! Anyway it is good to grab the motherboard from sides and ports.

3. Step three installing processor. This may feel scary, but its not. In this case we have new Core I5 processor. Open the processor socket by pushing down the metal lever and then pull it to right, it will open.

4. Now it is open.

5. Then look from your motherboard manual how the cpu should be installed. This socket had two holes which had to be aligned. In other words you can't install the cpu wrong, because it only fits in right position. Hold the processor from sides. Don't touch the pins at bottom but don't worry too much. It won't break. Remove the plastic cover from motherboard.

6. When you have placed the processor its time to lock it back and insert some silicon. This motherboard had very tight lock and I thought it will break but it has to be closed so just close it.

7. Insert silicone a little bit and spread it with finger or something.

8. After silicone

9. Use silicone which is for computers. Nothing else is suitable.

10.Next insert CPU cooler. Intel processors are very easy to insert. Just press it and it will make a sound "SNAP" when it's attached. If you turn the black things which has arrows the cooler will pop out. This was a mistake I did. Dont turn those, just press the cooler on.

11. Look port which says CPU FAN or look from the motherboard manual where that is located. Insert your cpu cooler cable to that port. It should fit only in one way.

12. Next we are going to insert RAM memory. RAM is installed into those two yellow bars. In modern computers ram memory works in dual channel so the ram slots are usually color coded. Install Your ram into ports which have the same color. For example you have 2 red and 2 yellow ports you should install 2 sticks into red or yellow. Not one in the yellow and one in the red. Same goes for ram port numbers if you have 4 slots which have the same color they are normally numbered.

13. Tilt the ram lock a bit backwards and it opens.

14. RAM stick will only fit in one position so you cant install it wrong.

15. Push hard (not too hard) and it will "click" when it's installed.

16. Installing display card. Modern display card need two holes from the back or if it's not high end display card it may take only one slot. Open this kind of slots from the back of your computer.

17. Push your display card into slot which says PCI-E 16x or something similar. Not only PCI...

18. Then look for hard drive bay. Usually modern cases have sleds for hard drives. Squeeze from the black things and pull the sled out.

19. Install your hard drive on to sled. and push it back to the case.

20. Install CD/DVD drive. Depending on your case either open the front panel and push the drive in or from back.

21. You should have two SATA cables which look like this:

22. Attach one in the back of your hard drive and the other end into sata1 port in the motherboard. Do the same thing for CD drive but insert it into sata2 drive.

23. Now it will get a little narrow in this case so you can tie the cables in to the case with cable ties if possible.

24. Install your power supply in the back of the case. Best way how to do this is look  from your manual how it is installed but it should not be too hard. This case had four screws.

25. Then you have to look from the motherboard manual how to insert small cables from your case to the motherboard. Includes powerbutton, usb ports, sound ports etc. Things that also need power are your hard drive, CD drive, some display cards require power and usually the motherboard itself has two ports that need power.

26. Insert power cable, display, mouse and keyboard. Don't close the case in case it doesn't work yet. Power on the computer and check if all the fans are rotating.

27. If you see your computers post screen or at least something in the screen it's a good sign and you should be ready to install operating system.

28. Example of a new modern bios screen. If you see this or something similar with usually blue background you can pat yourself on the shoulder.

29. Install operating system.

Fault conditions

Computer doesn't start.
- Check that motherboard light turns on when you put power cable in to the machine
- Check that your case powerswitch cable is connected to the right pin in motherboard
- Check that all power cables are connected to motherboard

If your monitor doesn't wake up or you don't see anything on the screen:
- Check that RAM memory is locked correctly
- Check that display card is connected correctly
- Check that your motherboard bios is correct for the CPU (motherboard bios should be in the manual and processors minimum bios version can be found from the internet)

Any other booting problems
- Start with minimum parts and try to boot. For example install just motherboard, power supply and processor. Then add display card, memory, hdd in order and see which part is not working.