TEJ4M
Number Systems
Number Systems
Welcome to TEJ4M - Computer Engineering Technology. Computer Engineering is a discipline that integrates several fields of electrical engineering and computer science required to develop computer systems. Computer engineers usually have training in electronic engineering, software design, and hardware-software integration instead of only software engineering or electronic engineering. Computer engineers are involved in many hardware and software aspects of computing, from the design of individual microprocessors, personal computers, and supercomputers, to circuit design. This field of engineering not only focuses on how computer systems themselves work, but also how they integrate into the larger picture.
Source: WikipediaYou are responsible for knowing these rules. The over-riding principle is that computers are to be used strictly for educational purposes only.
You are not allowed to eat or drink (water may be left at desk) near the computers
Do not share your passwords with others. Do not let anyone else use your account!
You are not allowed to play games, apart from games that are part of your course work. No commercially prepared games can be brought into the lab or installed please.
You are not allowed to have streaming video. (too much bandwidth).
Do not bring bags and coats into the lab.
Do not alter things like the desktop/system files without permission
Much like last year, you will be making a google site. However, feel free to reuse/add-to your site from TEJ3M. It may require restructuring of your site to accommodate both the TEJ3M and TEJ4M courses but depending on your post secondary pathways that information might be valuable to keep. Make the same page/unit divisions as last year (ie: number systems/computer systems/networking etc...)
Research one of the following topics and develop a rich presentation for it (ie: include pictures/videos/sounds as appropriate). The presentation should include a general statement summarizing your answer to the question; this is your thesis or main idea.
e.g. Artificial Intelligence should not be included in robots on a battlefield because humanity will die.
(ok, maybe something a little more focused and less dramatic)
The rest of your presentation should consist of the information or evidence that supports your opinion. The last page should list your references. You will be presenting your findings to the grade 12's when you are complete.
Some prompting questions you can use. If you have a strong desire to address your own topic please pass it by me for approval:
Do computers alienate the user from society?
What careers will be in demand in the future? How can we train for these careers?
Is it truly possible to create artificial intelligence?
Will computers create jobs or eliminate them?
What are the implications of the new technology in the Green Industry in Canadian?
How realistic is the prediction of the "paperless office"?
How realistic is it to force all students in Ontario to take 2 online courses before graduation?
Will computers in the office remove the need for skilled workers or demand new skills and knowledge of employees?
How computer literate will we have to be to operate the computers of the future?
Are there 'boy video games' and/or 'girl video games'? Does the gaming industry think there is?
How have computers affected the entertainment industry?
How may computers change the home?
Will leisure time increase due to the use of computers in society?
Are we going to have a "cashless society"?
Are computers threatening us with "invasion of privacy"?
How serious is computer crime? What can we do about it?
Does increasing societal dependence on computers make them attractive as terrorist targets? (think larger than a 'home pc')
Is it immoral to copy software?
Is there a relationship between video games and juvenile crime?
How can computers help people with handicaps?
What are the occupational health and safety hazards of computers?
Yes. Again. If you move into industry these have to be second nature. Remember, a numeral system (or system of numeration) is a writing system for expressing numbers, that is a mathematical notation for representing numbers of a given set, using graphemes or symbols in a consistent manner. It can be seen as the context that allows the symbols "11" to be interpreted as the binary symbol for three, the decimal symbol for eleven, or a symbol for other numbers in different bases. (source)
At first, it would seem like using any number system other than decimal is complicated and unnecessary. However, since the job of electrical and software engineers is to work with digital circuits, engineers require number systems that can best transfer information between the human world and the digital circuit world and those forms are usually binary, octal, or hexadecimal. It turns out that the way in which a number is represented can make it easier for the engineer to perceive the meaning of the number as it applies to a digital circuit. In other words, the appropriate number system can actually make things less complicated.
While useful in their own right, often numbers are more meaningful in another number system. For example, an electrical engineer who is working on a hexadecimal "programming layer", may want to translate something into a binary "machine layer", as such, they need to be able to convert quickly between the base 16 number system (HEX) to the base 2 number system (BIN, or 0b).
The three systems of interest for us are decimal (dec), binary (bin) and hexadecimal (hex).
-Computers use what number system? Binary (base 2)
- 0 OFF (false)
- 1 ON (true)
- 1 binary digit - 1 bit
- 8 binary digits - 1 byte
- 4 binary digits - 1 nybble
-Hexadecimal number system is for humans and computers (eg. RGB colour codes)
To convert between Decimal and Binary you can either arrange the columns by their respective placeholders, or use the remainder method of conversion
Consider the number 294. The steps below show how to convert this number to binary using repeated division by 2. The 'R' stands for the remainder of the division
An easy method of converting decimal to binary number equivalents is to write down the decimal number and to continually divide-by-2 (two) to give a result and a remainder of either a “1” or a “0” until the final result equals zero. If there's a non-perfect division (e.g. the remainder is 0.5) then the remainder becomes 1 and the number rounds down.
NOTE: THE FIRST DIVISION IS ON THE RIGHT, THE LAST DIVISION IS ON THE LEFT
e.g. the number 294
divided by 2
is evenly 147 with a remainder of 0
divided by 2
is 73.5->73 (there's a decimal so we round down) and the remainder is 1
divided by 2
is 36.5->36 with a remainder of 1 (rounded down and the # becomes 36 with the R =1)
divided by 2
is evenly18 with a remainder of 0
divided by 2
is evenly 9 with a remainder of 0
divided by 2
is 4.5->4 with a remainder of 1
divided by 2
is evenly 2 with a remainder of 0
divided by 2
is evenly 1 with a remainder of 0
divided by 2
is 0.5->0 with a remainder of 1
So the number's : 1 0010 0110
You could also just do raw-figuring using the subtraction method. Let's take the number 114
114 isn't bigger than 128 so there are no 128's
114 IS bigger than 64 so it contributes 1 and we subtract 64 from 114 leaving 50
50 is bigger than 32 so we take 32 away from 50 leaving 18
18 is bigger than 16 so we take away 16 from 32 leaving 2
2 isn't bigger than 8 so it contributes 0
2 isn't bigger than 4 so it contributes 0
2 is subtracted at the 2's column leaving 0
there's nothing left to subtract in the 1's column so it's 0
So 114 is: 01110010 in 0b (but we generally don't show leading 0's so 1110010)
To convert binary to decimal is relatively easy. All you have to do is list out the columns, then add up representative placeholders. Let's say for example we want to convert 101101(0b) to dec:
32 + 8 + 4 + 1 = 45
You can also use the dividing approach as with binary, but with alterations. Here are the steps:
Step 1: Divide the number by 16. Store the whole number for the next step. Take the decimal remainder (if there is one) and multiply by 16. Store it.
Step 2: Take the whole number from the last step and divide by 16 as per the last step. Repeat these 2 steps until the last whole number is 0. This will be the last step
Step 3: The final hexadecimal value will be the reverse order you stored (like in dec to bin conversions)
EG Decimal number = 450(10)
Step 1: 450/16 gives 28.125, Store 28 for the next step. 16x0.125=2, so the remainder is = 2
Step 2: 28/16 gives 1.75; Store 1 for the next step. Multiply 0.75x16, the remainder of 12 = C
Step 3: 1/16 gives 0; 16x0 and remainder = 1
Step 4: 0/16 gives 0 and remainder = 0
Therefore, the hexadecimal value is 01C2(16)
EG Decimal number = 118(10)
Step 1: 118/16 gives 7.375, Store 7 for the next step. Multiply 16x0.375 so the remainder = 6
Step 2: 7/16 gives 0.4375; 0.4375 x 16 = 7 Store 0 for the next step. remainder of 7
Step 3: 0/16 gives 0 and remainder = 0
Therefore, the hexadecimal value is 076(16)
173/16 = 10.8125 and we'd take the 0.8125x16 = 13
Notice with 10 I SHOULD have that go to the next step which is
10/16 = 0.625, but since we'd just multiply it back by 16 to get the remainder (10) it's simpler to remember: If the whole number of the decimal that's left is <16, then that is the remainder for the next step.
e.g. in step 1 above:
173/16 = 10.8125 and we'd take the 0.8125x16 = 13
since 10 is <16 it's the next remainder. so the remainder order is:
13 = D
10 = A
So it's AD(16)
Is exactly like converting binary to decimal, simply list out the columns and add the results.
Let's take the number 1D16
16's column | 1's column
(1 x 16) + (13 x 1) = 2910
How about this one A6316
256's column | 16's column | 1's column
(10x256) + (6x16) + (3x1) = 265910
Try this:
C0216 to base 10 (equals 3074 )
This is the easiest type of conversion because we break the columns in hex down into 'octets' (also known as a byte).
To convert we simply break the Hex into two separate column, then assign the binary values to the octet. To convert hexadecimal F8 to binary, write down the binary for F first, then the binary for 8.
So, the answer is 1111 1000
This seems too easy, and it is. Use a calculator to convince yourself. Convert hex number 1A to binary.
Answer: 0001 1010
Is the exact same as HEX to BIN, but in reverse. To convert, we break the binary value into octects, then convert each to hex separately. Let's convert 10110 to HEX. First break it into octects and include leading zeroes on the octet to the left
As you can see it's 16
Step 1:
0001 0110
Step 2 (convert each octet to hex)
1 6
What about the binary number 1101101
0110 1101
6 13 (which is D)
So the HEX value is 6D. Pretty easy!
Go to the following website, or watch the youtube video in Classroom or refer to our notes. Answer the questions from the google doc worksheet and when you're finished post it on your Google Site as Assignment #2 on the Number Systems webpage. Double check your answers using the programmer-menu on windows calculator.
1. Convert these ipv4 addresses to binary:
a. 10.190.17.20
b. 171.153.25.6
2. Convert the following subnet masks to hex:
a. 255.255.238.0
b. 255.215.0.0
3. Graphics programs use hex to decimal conversion all the time. Convert the following colours to decimal:
a. red (FF:00:00) (each is a separate byte)
b. blue (00:FF:00)
c. aquamarine (7F:FF:D4)
4. Same as #3, but the other way. Convert the following decimal values to hex. What colours are they?:
a. 238:130:238
b. 240:230:140
5. Convert the following ipv6 number to decimal:
a. 2001:db8:3333:4444:CCCC:DDDD:EEEE:FFFF
6. Convert the following binary values to hex:
a. 10110011
b. 11101101
Be able to convert from
Quiz is in Classroom