CSCI 2400 Lecture 1: Week1

52 views12 pages

Document Summary

By encoding /interpreting sets of bits in various ways. And represent and manipulate numbers, sets, strings, etc . Reliably transmitted on noisy and inaccurate wires. Represent 1. 53213 * 10 as (1. 1101101101101) *2. Use characters 0" to 9" and a" to f". Developed by george boole in 19th century algebraic representation of logic encode true as 1 and false as 0. A&b = 1 when both a=1 and b=1. A|b = 1 when either a=1 or b=1. A^b =1 when either a=1 or=1, but not both. All of the properties of boolean algebra apply. Operations &, |, ~, ^ available in c. Early termination (cid:718)(cid:718)watch out for && vs. & (and || vs. |) . One of the more common oopses in c programming. 0x69 || 0x55 (cid:736) 0x01 p && *p (avoids null pointer access) Replace most significant bit on left (cid:718)undefined behavior. Shift amount < 0 or >= word size. For 2"s complement, most significant bit integers sign.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents