CSE 15 Lecture Notes - Lecture 6: Logarithm, Edge Case, C Dynamic Memory Allocation

25 views6 pages
29 Apr 2017
School
Course
Professor

Document Summary

Bitvectors: base 10: 10(10) = (in binary) 1010(2) If you print 0, nothing happens: |" = 49(10, 1 = ^a, 7 = 111(2) Symbols: ^ = & = (and, v = | = (or, o (crosshairs symbol) = ^ (xor, &| 0 1. | f t: 0 is identity, 1 with 1 = 1, 0 with anything equals 0. Bytes: byte = 8 bits four bytes equal an int, 4 * 8 = 32 bits, big endian network order, little endian. Why stdint: char = 1 byte, sizeof(short) >= sizeof(char, sizeof(int) >= sizeof(short, sizeof(long) >= sizeof(int) long = 16 bit. Int = 32 bit longlong = 64 bits. Include file include files define things typedef int int32. t; typedef unsigned char uint8. t; bitset: bitset(v, k, 0 <= k < 8, v = v|(0*1 << k, bitset(v, 5, 0 * 1 << 5, 00000001 << 5, 00010000.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents