syntax_vs_semantics

syntax_vs_semantics - What is Code? Syntax Semantics Form...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

View Full DocumentRight Arrow Icon

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

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

Unformatted text preview: What is Code? Syntax Semantics Form How? Structure Content What? Meaning KiKi Boobooo Smart Syntax Smart Syntax Onomonopea Ribbit, bang, splash, slurpy, meow, hiccup Syntax of Numbers 1 One I 0001 Uno 5 Five V 0101 Cinco 01 + 10 11 Good Syntax Implies Semantics 100% One hundred percent cien por ciento Bit = Binary Digit = 1 or 0 Byte = 8 bits Nibble = 4 bits Addition 54 23 77 61 19 80 10 61 19 80 + + = + 00110110 00010111 01001101 + 128 64 32 16 8 4 2 1 + 00111101 00010011 01010000 + 128 64 32 16 8 4 2 1 tens ones tens ones tens ones tens ones Negative Binary Numbers? Fractional Binary Numbers? 1010.101- 010010101 ? A new symbol ? A sign bit ? A decimal point? Two's Complement Sign Bit: 1 in the first bit means the number is negative To Decode: Take the complement and add one 1011 Complement 0100 Plus 1 = 0101 = (-) 5 To Encode: Copy from right to left up to and including the first one then complement 0100 = 4 100 Copy 1100 Complement 1100 = - 4 Syntax of Functions...
View Full Document

This note was uploaded on 02/06/2011 for the course CSCI 127 taught by Professor Friedman during the Spring '11 term at CUNY Hunter.

Page1 / 28

syntax_vs_semantics - What is Code? Syntax Semantics Form...

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

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