lecture27-apr6 - Lecture 27 Announcements Exam 2 High = 100...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 27 Announcements •E x am 2 – High = 100 –Low = 38 – Median = 84.5 • Friday lecture off • Assignment 5 – Write down your stats • Assignment 6 later this week • Read Chapter 20 (low level programming) • Topics of the day: think in binary today – Low level programming (for systems) – Bit twiddling • Bit values are 1 or 0 – Machine dependent operations Low Level Programming • Usually machine dependent by nature – Storage unit differences and alignment issues – R to L, or L to R allocation of bits to units • Bit (byte) level manipulations are necessary for: – Operating systems, compilers, etc. – Encryption programs – Graphics – Embedded systems – Intelligent devices – others where fast execution or space utilization is critical • Portability is compromized unless the machine dependent computations are encapsulated – E.g. only use unsigned or signed variables • Lack of programmer documentation is an absolute killer in this area • You must know your binary and hexidecimal numbers Bit Level Operations • Performed on ints ( words ) and chars ( bytes ) in C • For example, on a sixteen bit value ( short int ) in which the bits are numbered from right to left (as in Windows ) 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 0’s 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0 0 Shift bits to the left 0’s 0 0 0 1 0 0 0 1 1 0 0 1 1 1 0
Background image of page 1

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

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/24/2010 for the course EE 312 taught by Professor Shafer during the Spring '08 term at University of Texas at Austin.

Page1 / 3

lecture27-apr6 - Lecture 27 Announcements Exam 2 High = 100...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online