Thursday, March 19, 2015

Digital Logic and Boolean Algebra

In relation to binary, Boolean algebra is a mathematical system for the manipulation of variables that can have one of the two values which are "true" and "false" in formal logic while on and off, or high and low, or 1 and 0 in digital system.

Boolean Functions
-expressions formed with binary variables and Boolean operators that produces an output that is either 1 or 0 and can be represented using Algebraic Expression, Truth Table or Logic Circuit

Example of Boolean Function:
F= A + (A'B)

Evaluating the given example by the given values:
A=0, B=1, x=0, y=0, z=1
F= 0 + (0'•1)
F= 0 + (1•1)
F= 0 + 1
F= 1 

Boolean Operations
Truth Table - shows the relationship between the input values and the result of a Boolean operator or function in tabular form.

Example of a Truth Table:


Digital Logic Circuits
Example:


Simplification of Boolean Functions
-simpler circuit is faster and less expensive 
-reduce the complexity of the ate level implementation and signal propagation delays
-the Laws of Boolean Algebra is applied

Example:
F= A + (A'B)
= (A + A') (A + B) distributive 
= 1 (A + B)             inverse
= A + B                  identity

Thursday, March 12, 2015

Binary Arithmetic

Consist of fundamental operations.

0+ 0 = 0          1 + 1 = 10
0 + 1 = 1          1 + 0 = 1

Fixed point representation is used to represent integer values (from what I taught on Number Systems)
Ex. 100 to base 2 will be 4 to base 10

Magnitude Representation (MR)
- using all bits to represent the magnitude but not the negative values.

Signed- Magnitude Representation (SMR)
-makes use of leftmost bit to represent it whether it is positive or negative.
If the leftmost number or the sign bit is 0, therefore it is positive,
but if it is 1 then it is negative.
Ex. 0100 = + (positive)
 1010= -(negative)

Signed Complement Representation (SCR)
-it is the same with SMR, but if it is negative we can either use 1's complement or 2's complement to convert it to decimal. There is no need to use 1's and 2's complement in a positive bits.

1's Complement Form
-using it with a negative one it will complement all of the bit so that it will be compatible with the negative value.
Ex. 1 11010010(negative)  complement is 00101101(final answer).

2's Complement Form
-using 2's complement form you will complement it first before you have to add one.
Ex. 1 11010010(negative) complement is 00101101 then add 1
= 00101101
+               1
= 00101110(final answer)

The Addition and Subtraction of Binary
-get the SCR of the negative numbers then add the two numbers
-If using 2's - discard end carry, 1's add the end carry to the sum
-In subtraction, convert it first to addition then use SCR then add the two numbers.




Thursday, March 5, 2015

Number Systems

When we type some letters , numbers or words, the computer decipher them in numbers as computer only understands it. Therefore, number system is used to represent digital data and the digital data is represented by symbols called digits.

The Number System introduced was Decimal, Binary, Octal, and Hexadecimal. Each Number System had their corresponding base and coefficients which is shown below:

    Number System           Base              Coefficients

  • Decimal                   10                      0-9
  • Binary                       2                       0, 1
  • Octal                         8                       0-7
  • Hexadecimal            16                    0-9, A-F
The Base Conversion was also discussed and as follows:
  1. Base-r to Decimal
  2. Decimal to Base-r
  3. Binary to Octal
  4. Binary to Hexadecimal
  5. Octal to Binary
  6. Hexadecimal to Binary
  7. Octal to Hexadecimal or Hexadecimal to Octal
Each Base conversion has its procedures and it has also a trick so that you can able to convert it faster. The Base-r to Decimal trick was just to align the numbers to 1,2,4,8,16,32,64,128 and so on and each aligned numbers at 1 will be added and the sum would be the answer but this is just for base 2 numbers. 
The Decimal to Base-r was the process of division and you will divide it by r in list view and accumulate its remainders and read the remainders up and that would be the answer. 
The Binary to Octal was to partition the binary numbers into groups of 3 and you can now compute its equivalent in decimal and that would be the answer. 
The Binary to Hexadecimal was to partition the binary number into groups of 4 and just like the Binary to Octal compute the equivalent decimals and that would be the answer. 
The Octal to Binary was to convert the 3 digits to its binary equivalent. 
The Hexadecimal to Binary was to convert each hexadecimal digit to its 4 digit binary equivalent. The Octal to Hexadecimal or Hexadecimal to Octal was to convert it first to either Binary or Decimal then you may convert it to octal or hexadecimal.