Lecture25_Serial_Comm_I

Binary basics

In mathematics and digital electronics, a binary number is a number expressed in the base-2 numeral system or binary numeral system, which uses only two symbols: typically 0 (zero) and 1 (one).

Base 10 counting system:
We happened to use the current counting system, because we happened to have ten fingers.
If dinosaurs had ruled the earth, they would be happy to use a 8-based counting system.. What does 157 mean? 157 = 1 x 100 + 5 x 10 + 7 x 1 = 1 x 10^2 + 5 x 10
^1 + 7 x 10^0

Imagine a specie that only has two fingers. how can they count? A computer is such kind of two-finger specie. 0 and 1 Each place is the exponential of 2.

Base 10: 157: 157 =
1 x 10^2 + 5 x 10^1 + 7 x 10^0
Base 2: 1011 = 1 x 2^3 + 0 x 2^2 + 1 x 2^1 + 1 x 2^0

1 bit is a single bit of information, a 1 or 0. Only two possible values.
1 byte is 8 bits, an 8 bit word
256 possible values from 0-255 base 10 or 00000000 to 11111111 base 2
10100110 is a single byte  Base 10 to Binary Binary mathematics Hexadecimal (base 16):
Binary code is too long in representation. Hex is much shorter. Converting a binary number to a Hex number is relatively easy. Every 4 bit can convert to a Hex.
Problem: we are short of numbers A-10 B-11 C-12 D-13 E-14 F-15

Lookup table: Example: Tasks:
1. Convert the following binary numbers to decimal: (1) 1011 (2) 1000 (3) 1111 (4) 1011001 (5) 1000000 (6) 10101.11 (7) 11101.001
2. Convert the following decimal numbers to binary: (1) 10 (2) 8 (3) 16 (4) 52 (5) 12.625 (6) 45.875 (7) 10.33
3. Convert to hexadecimal and then to binary: (Round to 4 digits past the decimal point) (a) 757.2510 (b) 123.1710 (c) 356.8910 (d) 1063.510

Work on these problems on papers, turn in a hard-copy (only) by Friday.