Example: Binary to Octal - PowerPoint PPT Presentation

1 / 13
About This Presentation
Title:

Example: Binary to Octal

Description:

base 2: 10011 goes to 01100. base 4: 32012 goes to 01321 ... EBCDIC. Binary Storage and Registers. Registers. Register transfer. Discuss Fig. 1-2 ... – PowerPoint PPT presentation

Number of Views:89
Avg rating:3.0/5.0
Slides: 14
Provided by: roberths
Category:
Tags: binary | ebcdic | example | octal

less

Transcript and Presenter's Notes

Title: Example: Binary to Octal


1
Example Binary to Octal

725.23 111 010 101 .
010 011
111010101.010011
2
Binary to Hexadecimal
2EB9.C
2 E B 9 . C
0010 1110 1011 1001 . 1100
0010111010111001.1100
3
Complements
In (R-1) Individually complement each
digit Examples base 10 90320 goes to 09679
base 2 10011 goes to 01100
base 4 32012 goes to 01321 In (R)Ignore
LSBs of zero(s) complement first non-zero digit
with (R-1) complement the rest with
(R) Examples base 10 90320 goes to 09680
base 2 10011 goes to 01101
base 4 32012 goes to 01322
4
Subtraction (2s complement)
Solving for (M - N), where M 10010110 (and
M 01101010) N 01110100 (and N
10001100) (M - N) 10010110 (M) (N - M)
01110100 (N) 10001100 (N)
01101010 (M)
100100010
011011110 carry means ()
no carry means (-) answer 00100010
answer 11011110
answer (-)00100010
5
Subtraction (1s complement)
M 10010110 (and M 01101001) N
01110100 (and N 10001010 (M - N)
(N - M) 10010110
(M) 01110100 (N) 10001011 (N)
01101001 (M) 100100001
011011101 1
11011101 00100010 (M - N) (-)
00100010 (-) (M- N)
6
Signed Binary Numbers
Signed Magnitude ()5 (-)6 In binary
Convention is to use left bit 0 for () 1 for
(-) Example 10000110 is (-)6 Better to use
Signed Complement (say 2s complement) Steps
to accomplish 1. Express as a positive number
0000 1101 () 13 2. Take 2s complement
11110011 (-) 13
7
Addition signed binary
Put negative numbers into 2s complement Add
numbers together Disregard any carry out If
answer has a 1 in the left bit, the answer is
negative (-) and you must then complement it
(sign bit and all) Example ()3 (-)7
(-)4 0000 0011 2s complement of 7 . . .
1111 1001 1111 1100 Left bit is a 1 so you
know answer is negative Take 2s complement
for answer (-) 000 0100, or (-)4

8
Subtraction in signed binary
  • Express all negative numbers in 2s complement
  • Take 2s complement of the subtrahend
  • Add the two numbers together
  • Discard any carry over
  • If left bit is a 0 the answer is positive
  • If left bit is a 1 the answer is negative and
    you must take the 2s complement to get the
    answer
  • Example (-)7 - (-)9 1111 1001 - 1111
    0111
  • 1111 1001 0000 1001 1 0000 0010 ()2

9
Subtraction (contd)
Now try this (-)9 - (-)7. . . And answer
better be (-)2 1111 0111 - 1111 1001 . . .
Take 2s complement of subtrahend 1111 0111
0000 0111 1111 1110 answer has a 1 in
its left bit therefore its negative take 2s
complement 0000 0010 and get (-) 2 as the
answer
10
Binary Codes
  • BCD
  • Excess-3 84-2-1 2421 (self complementing)
  • Error Detection Codes (parity)
  • Gray Code
  • ASCII Code
  • Hollarith Code
  • EBCDIC.

11
Binary Storage and Registers
  • Registers
  • Register transfer
  • Discuss Fig. 1-2
  • Discuss Fig. 1-2

12
Binary Logic
  • AND, OR, NOT
  • Truth Tables
  • Switching Circuits
  • Gates
  • Thresholds
  • Multiple inputs
  • Timing Diagrams

13
Laboratory Comments
  • Volts, amps, ohms, watts
  • VOM
  • resister codes
  • wire sizes
  • breadboard
  • equipment function generators, oscilloscopes,
    etc
  • test probes
  • report writing
Write a Comment
User Comments (0)
About PowerShow.com