{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# Chap2 - Chapter 2 Bits Data Types Operations Our first...

This preview shows pages 1–6. Sign up to view the full content.

Chapter 2 Chapter 2 Bits, Data Types & Operations

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Data types Data types Our first requirement is to find a way to represent  information (data) in a form that is understood by  both human and machine. We need to represent the following data: Numbers. Text. Image. Videos. We will start by examining different ways of representing  integers and look for a form that suits the computer.
Decimal Numbers Decimal Numbers “decimal” means that we have ten  digits to use in  our representation (the symbols  0 through 9) What is 3,546? it is  three  thousands  plus  five  hundreds  plus  four  tens  plus  six  ones . i.e. 3,546 = 3.10 3  + 5.10 2  + 4.10 1  + 6.10 0 How about negative numbers? we use two more symbols  to distinguish positive and negative:     +  and  -

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Binary Numbers  Binary Numbers  Devices react to the voltage. We represent the presence of voltage by 1 and  absence of voltage by 0. 0 & 1 is referred as bit – binary digit.
Unsigned Binary Integers Unsigned Binary Integers 00000100 00100 100 4 00000011 00011 011 3 00000010 00010 010 2 00000001 00001 001 1 00000000 00000 000 0 8-bits 5-bits 3-bits Y = “abc” = a.2 + b.2 1  + c.2 0 N = number of bits Range is:   i  < 2 N  - 1 (where the digits a, b, c can each take on the values of 0 or 1 only) Problem: How do we represent  negative  numbers?

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern