Docsity

Computer Organization and Architecture: Data Representation, Slides of Software Project Management

Partial preview of the text

Download Computer Organization and Architecture: Data Representation and more Slides Software Project Management in PDF only on Docsity!

COMPUTER ORGANIZATION AND

ARCHITECTURE

HAREEM-E-SAHAR LECTURE NO. 1 FACULTY OF COMPUTING RIPHAH INTERNATIONAL UNIVERSITY (WISH CAMPUS)

Introduction to Basic

Concepts

Course Objectives

This course is about familiarizing you with:

structure and functions of computer

nature and characteristics of modern day

computers

architectural designs and their

compromises

* These are subject to change.

Grading Policy Assignments 15% Quizzes 15% Midterm Exam (15-30)% Final Exam 40%

Grading Policy

There is going to be no extension in any of the

deadline, what so ever

You can request for re-checking of any of your

evaluation as per following rules;

Exams: Same day

Assignments: 2 days after handing-over

Quizzes: 1 day after handing over

Warning! After due time, request will not be

considered even if it’s genuine.

To Survive in Course...

You have to depend on yourself to have a good grade in the course  (^) You need to appear in demo to have it graded otherwise you will be given 5% of the total marks even if it was best assignment/project of the class  (^) Grading will be individual even for group tasks. So better to shine with your own work in hand otherwise don’t complain  (^) Your written assignments may be marked on the basis of a quiz taken from the assignment. The performance of quiz will be considered as performance in that assignment.

Today’s topic - Data Representation

Binary Numbers

Hexadecimal Numbers

Base Conversions

Integer Storage Sizes

Binary and Hexadecimal Addition

Signed Integers and 2's Complement

Notation

Binary and Hexadecimal subtraction

Carry and Overflow

Character Storage

Binary Numbers

 (^) Each digit (bit) is either 1 or 0  (^) Each bit represents a power of 2: Every binary number is a sum of powers of 2

Converting Binary to Decimal

Weighted positional notation shows how to

calculate the decimal value of each binary bit:

Decimal = ( dn-1  2 n -1)  ( dn-2  2 n -2)  ...  ( d 1  21 )  ( d 0 

d = binary digit

binary 00001001 = decimal 9:

Hexadecimal Integers

Binary values are represented in hexadecimal.

Converting Binary to Hexadecimal

  • (^) Each hexadecimal digit corresponds to 4 binary bits so make chunks of 4.
  • (^) Example: Translate the binary integer 000101101010011110010100 to hexadecimal:

Lecture 12th^ Feb, 2018

Converting Decimal to Hexadecimal Decimal 422 = 1A6 hexadecimal stop when quotient is zero least significant digit most significant digit

 Repeatedly divide the decimal integer by 16. Each
remainder is a hex digit in the translated value:

 (^) Several ways to represent a signed number

› Sign-Magnitude
› Excess
› 1's complement
› 2's complement

 (^) Divide the range of values into 2 equal parts

› First part corresponds to the positive numbers
› Second part correspond to the negative
numbers (< 0)

 (^) Focus will be on the 2's complement representation

› Has many advantages over other
representations
› Used widely in processors to represent signed
integers

19

 Is a representation of negative numbers

possible?

 Unfortunately:

› (^) you can not just stick a negative sign in front of a binary number. (it does not work like that) 

There are three methods used to represent

negative numbers.

› Signed magnitude notation
› Excess notation
› Two’s complement notation

20