# CMPUT272 Lecture Notes - Lecture 4: Codomain, Boolean Expression, Boolean Function

37 views5 pages
14 Oct 2014
School
Course
Professor
September 11 2014
ETLC E2-001
Review of Booleans
Boolean function
The mappings of elements from one set to another
An abstract mathamatical concept or idea
Representable as:
- A picture
- A boolean expression
- A truth table
- Nested sets
- etc etc etc
Boolean expression
A representation of a boolean function
Domain and Co-domain
Boolean functions will have a domain of {0,1}^n where n is the n-
variables
of input
Boolean functions always have a co-domain of {0,1}
Co-domain in the domain of the 'output'
Because computers are based on electrical circuits of power-on/power-of
they are inheriently boolean in nature. Each program can be defined as
being the mapping of every possible input to every possible output.
Number systems
A number is an abstract mathamatical concept or object.
Usually used for counting and measuring.
We have many ways to represent numbers
- Some objects
- Sound (e.g. the word 'three' when said aloud)
- Symbol (numeral) ('3', or 'III')
- Words ("three")
- Dots marked on a page { o o o }
- Arithmetic expression ( 8-5 )
Positional Number Systems
Base 10:
5439 = (5 * 10^3) + (4 * 10^2) + (3 * 10^1) + (9 * 10^0)
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

Base b>1, b N: ā
digits are: 0, 1, ..., b-1
Base is denoted by adding a subscript to a numeral
For convience, when base is > 10, use [n] to represent numerals
larger than 9.
The value of an n-digit base b number: d_n-1, d_n-2, ..., d_1, d_0 is:
(d_n-1 * b^(n-1)) + (d_n-2 * b^(n-2)) + ... + (d_1 * 10^1) + (d_0
* 10^0)
The resulting number from this method will be in base 10
e.g. 4113_5 -> base 10 = 4x5^3 + 1*5^2 + 1*5^1 + 3*10^0 = 533
To convert a number from base 10 into base b...
Find a sequence of base b digits d_n-1, d_n-2, ..., d_2, d_1, d_0
such that
the resulting sequence represents the base 10 number we are
trying to convert
Q-R Theorem
x = pq + r
0 <= r <= b
x = d_n-1*b^n-1 + d_n-2*b^n-2 + ... + d_2*b^2 + d_1*b^1 +
d_0*b^0
= b(d_n-2*b^n-1 + d_n-3*b^n-2 + ... + d_2*b^1 + d_1*b^0) + d_0
\--------------------------------------------------/ \---/
quotent of x/b
remainder
/
/-------
/------
_____ _____ ... ____ ____ ____
d_n-1 d_n-2 d_2 d_1 d_0
Repeat the above process, using the remainders given as the
digits for
the converted number from base 10 into base b
Interesting Number systems
Binary base 2
Octal base 8
It is easy to convert binary directly into and out of hexadecimal
by mapping groups of 4 digits of binary to one digit of hexadeciaml.
0101 0001 0010 0100 0100 1010 1001 1111
5 1 2 4 4 A 9 F
Unlock document

This preview shows pages 1-2 of the document.
Unlock all 5 pages and 3 million more documents.

## Document Summary

The mappings of elements from one set to another. Boolean functions will have a domain of {0,1}^n where n is the n- variables of input. Boolean functions always have a co-domain of {0,1} Because computers are based on electrical circuits of power-on/power-of they are inheriently boolean in nature. Each program can be defined as being the mapping of every possible input to every possible output. A number is an abstract mathamatical concept or object. Sound (e. g. the word "three" when said aloud) Dots marked on a page { o o o } 5439 = (5 * 10^3) + (4 * 10^2) + (3 * 10^1) + (9 * 10^0) Base b>1, b n: digits are: 0, 1, , b-1. Base is denoted by adding a subscript to a numeral. For convience, when base is > 10, use [n] to represent numerals larger than 9.

## Get access

\$8 USD/m\$10 USD/m
Billed \$96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
Class+
\$8 USD/m
Billed \$96 USD annually
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class