# lec2 - TA C162 Computer Programming I Lecture Sessions 1 1...

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

1 TA C162 Computer Programming I 1/11/2006 Lecture Sessions 1. Representation of Numbers 1. Digital Electronics 2. 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 program 1. Introduction to C Programming

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

View Full Document
2 TA C162 Computer Programming I 1/11/2006 Today’s Menu Representation of Numbers Binary Numbers Unsigned Integers Non Positional  Positional Signed Magnitude 1’s Complement 2’s Complement
3 TA C162 Computer Programming I 1/11/2006 How do we represent data in a computer? At the lowest level, a computer is an electronic machine. Works by controlling the flow of electrons Easy 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  value  of voltage??  Problem: Control and detection circuits more complex. Compare turning on a light switch to measuring or regulating voltage

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

View Full Document
4 TA C162 Computer Programming I 1/11/2006 Computer is a binary digital system Binary (base two) system : Has two states: 0 and 1 Digital system: Finite number of symbols
5 TA C162 Computer Programming I 1/11/2006 Computer 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, 111 Inference: A sequence of  n  bits has  2   n  possible states.

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

View Full Document
6 TA C162 Computer Programming I 1/11/2006 What kinds of data do we need to represent?
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