# Lecture2 - 2-1TA C162 Computer Programming I1/9/2006Lecture

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

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

View Full Document

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

View Full Document

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.

Unformatted text preview: 2-1TA C162 Computer Programming I1/9/2006Lecture Sessions1.Representation of Numbers1.Digital Electronics2.Computer Programming•Low Level Programming –LC3 Simulator•High Level Programming 1.Problem solving Strategies•Flow Charting and Algorithm design issues•Translation of Algorithm into High level program1.Introduction to C Programming2-2TA C162 Computer Programming I1/9/2006Representation of Numbers•Binary Numbers•Unsigned IntegersNon Positional Positional•Signed Magnitude•1’s Complement•2’s Complement2-3TA C162 Computer Programming I1/9/2006How do we represent data in a computer?At the lowest level, a computer is an electronic machine.•Works by controlling the flow of electronsEasy to recognize two conditions:1. Presence of a voltage – we’ll call this state “1”2. Absence of a voltage – we’ll call this state “0”Could base state on valueof voltage Problem:Control and detection circuits more complex.•Compare turning on a light switch to measuring or regulating voltage2-4TA C162 Computer Programming I1/9/2006Computer is a binary digital systemBinary (base two) system:•Has two states: 0 and 1Digital system:•Finite number of symbols2-5TA C162 Computer Programming I1/9/2006Computer is a binary digital system Cont…Basic unit of information is the binary digit, or bit.Values with more than two states require multiple bits.•A sequence of two bits has four possible states:00, 01, 10, 11•A sequence of three bits has eight possible states:000, 001, 010, 011, 100, 101, 110, 111Inference:•A sequence of nbits has 2npossible states.2-6TA C162 Computer Programming I1/9/2006What kinds of data do we need to represent?represent?...
View Full Document

## This note was uploaded on 05/14/2010 for the course CS SS ZG653 taught by Professor Shanta during the Spring '09 term at Birla Institute of Technology & Science.

### Page1 / 21

Lecture2 - 2-1TA C162 Computer Programming I1/9/2006Lecture

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online