Lab 2a - samuelGreitzer/SYS-140-Tech-Journal GitHub Wiki
Brief: This lab is about translating between decimal binary and hexadecimal numbers for the purposes of understanding IP addresses
- To convert from decimal to binary, you divide the decimal number by 2 and write down the remainder as the first digit of the binary number. Then you divide the quotient by two and repeat the process until the quotient is 0. ex. 66/2=33r0 33/2=16r1 16/2=8r0 8/2=4r0 4/2=2r0 2/2=1r0 1/2=0r1 final result: 100010
- To convert from binary to decimal, starting from the far right place, each place is equivalent to 2^place number-1. So the fourth place in a binary number would be equal to 2^3 or 8. once you have figured out the equivalency for each position you then add the positional equivalent of each place with a 1. ex. 0110 starting from the left the places are 2^3, 2^2, 2^1, 2^0 or 8, 4, 2 and 1. 4+2=6
- To convert decimal to hexadecimal, A is 10, B is 11, C is 12, D is 13, E is 14, F is 15. each place is 16^place number-1.
- To convert binary to Hexadecimal, I personally convert the binary to decimal and then the decimal to hex.