Lecture 02 Notes

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

Codes

A system for transferring information among people and machines


Most codes are NOT secret!
o Must be well understood
EX: Morse Code
(Number of possible symbols)^(message length)= Possible Messages that can be
transmitted.
Counting Systems
Used to represent quantities
Normally count in Base 10 (decimal)
Overflow
This the result of more quantities that can be represented in digits
Result is rollover where a new position is created.
Sum of Powers
o Each position indicates some power of the base
o The right most is always the base.
o We can describe a number as the sum of various of the base.
The base must be stated. EX: Mickey only 3 digits

Counting for dolphins (Binary)


Binary only has two digits.
o Binary digit aka bit
Bits roll over more quickly than they do in base
From Any Base to Decimal
1. Under each digit write the power of the base that goes with that position
2. Multiply each digit by its power of the base
3. Add up all of these products
4. The sum is equal to the decimal (base 10) value
From Decimal to Any base
1. Repeatedly divide the original number by the bases
a. Set aside the remainder of each division
b. Use the quotient for the next round of division
2. When the quotient reaches 0, write down all of the remainders in order from last to
first This value is your answer.

Hexadecimal
Hexadecimal make it easier to check alterations in the transmission of data
Binary number are very long and hard for humans to remember.
If we group digits together we have less to remember
There are 16 possible 4 bit combinations
o This is base 16 hexadecimal
o We use A-F for the extra digits.
Hexadecimal Example
o

You might also like