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 DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: 21TA 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 Programming22TA C162 Computer Programming I1/9/2006Representation of Numbers•Binary Numbers•Unsigned IntegersNon Positional Positional•Signed Magnitude•1’s Complement•2’s Complement23TA 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 voltage24TA C162 Computer Programming I1/9/2006Computer is a binary digital systemBinary (base two) system:•Has two states: 0 and 1Digital system:•Finite number of symbols25TA 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.26TA 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.
 Spring '09
 SHANTA
 Computer Programming

Click to edit the document details