CSE 102 Introduction to Computer Engineering - PowerPoint PPT Presentation

About This Presentation
Title:

CSE 102 Introduction to Computer Engineering

Description:

Title: CS107: Introduction to Computer Science Author: mbowden bowdoin Last modified by: Esin Onbasioglu Created Date: 9/8/2003 10:55:57 PM Document presentation format – PowerPoint PPT presentation

Number of Views:86
Avg rating:3.0/5.0
Slides: 12
Provided by: mbow8
Category:

less

Transcript and Presenter's Notes

Title: CSE 102 Introduction to Computer Engineering


1
CSE 102Introduction to Computer Engineering
  • Number System

2
Number Systems
  • Binary numbers (Base 2) 0,1
  • Octal numbers (Base 8) 0,1,2,3,4,5,6,7
  • Decimal numbers (Base 10) 0,1,2,3,4,5,6,7,8,9
  • Hexadecimal numbers (Base 16) 0,1,2,3,4,5,6,7,8,
    9,A,B,C,D,E,F

3
Decimal to Binary Conversion
  • (102)10 (?)2
  • (1100110)2

Divide by 2 Remainder
102 2
51 2 0
25 2 1
12 2 1
6 2 0
3 2 0
1 2 1
0 2 1
4
Decimal to Binary Conversion
  • (0.125)10 (?)2
  • (0.001)2

Multiply by 2 Integer part
0.125 2
0.25 2 0
0.5 2 0
1.0 2 1
5
Decimal to Binary Conversion
Multiply by 2 Integer part
0.4 2
0.8 2 0
1.6 2 1
1.2 2 1
0.4 2 0
0.8 2 0
1.6 2 1
1.2 2 1
0.4 2 0
  • (0.4)10 (?)2
  • (0.01100110)2
  • (0.0110)2

6
Binary to Octal and Hexadecimal Conversion
  • Octal (1100110)2 (?)8
  • (001100110)2 (146)8
  • 1 4 6
  • Hexadecimal (1100110)2 (?)16
  • (01100110)2 (66)16
  • 6 6

7
Binary to Octal and Hexadecimal Conversion
  • Octal (0.01100110)2 (?)8
  • (0.011001100)2 (0.314)8
  • 3 1 4
  • Hexadecimal (0.01100110)2 (?)16
  • (0.01100110)2 (66)16
  • 6 6

8
Representation of Integers
  • Signed-magnitude representation
  • 2s complement representation

9
Signed-magnitude Representation
sign bit 0-positive 1-negative
integer
  • Ex 10210
  • - 10210

0 0 0 0 1 1 0 0 1 1 0
1 0 0 0 1 1 0 0 1 1 0
10
2s complement Representation
  • To find 1s complement of a binary number change
    1s to 0s and 0s to 1s
  • To find 2s complement of a number add 1 to its
    1s complement
  • Ex (102)10 (0001100110)2
  • 1s complement 1110011001
  • 2s complement 1110011010

11
2s complement Representation
  • Ex
  • 10210
  • -10210

0 0 0 1 1 0 0 1 1 0
1 1 1 0 0 1 1 0 1 0
Write a Comment
User Comments (0)
About PowerShow.com