{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

syntax_vs_semantics

# syntax_vs_semantics - What is Code Syntax Form How...

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

What is Code?

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

View Full Document
Syntax Semantics Form How? Structure Content What? Meaning

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

View Full Document
KiKi Boobooo
Smart Syntax

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

View Full Document
Smart Syntax
Onomonopea Ribbit, bang, splash, slurpy, meow, hiccup

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

View Full Document
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 ≈

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

View Full Document
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

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

View Full Document
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

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

View Full Document
Syntax of Functions f(x) = x + 2 Java: C++: lisp: public int add_two (int input){ int output = input + 2; return output; } int add_two (int input){ int output = input + 2; return output; } (define add_two(input) (+ input 2) ) x f(x) 2 -2
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 28

syntax_vs_semantics - What is Code Syntax Form How...

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

View Full Document
Ask a homework question - tutors are online