This document discusses different binary coding schemes for representing decimal numbers:
1) Binary conversion represents a decimal number as a binary number, such as 1310 = 11012.
2) Binary coded decimal (BCD) assigns a 4-bit binary code to each decimal digit, following a weighted 8, 4, 2, 1 scheme. BCD allows addition of decimal numbers by performing binary addition on the coded digits.
3) Excess-3 and 8,4,-2,-1 codes are alternative binary codes for representing decimal digits. Boolean algebra uses binary variables and operators like AND, OR, and NOT to manipulate binary values representing true/false or on/off states.
2. Conversion or Coding?
• Do NOT mix up conversion of a decimal number to a binary number
with coding a decimal number with a BINARY CODE.
• 1310 = 11012 (This is conversion)
• 13 0001|0011 (This is coding)
3. Binary Coded Decimal (BCD)
• The BCD code is the 8,4,2,1 code.
• 8, 4, 2, and 1 are weights
• BCD is a weighted code
• This code is the simplest, most intuitive binary code for decimal digits
and uses the same powers of 2 as a binary number, but only encodes
the first ten values from 0 to 9.
4. BCD Arithmetic
Given a BCD code, we use binary arithmetic to add the digits:
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
Note that the result is MORE THAN 9, so must be
represented by two digits!
To correct the digit, add No. 6
8 1000 Eight
+5 +0101 Plus 5
13 1101 is 13 (> 9)
+0110 so add 6
carry = 1 0011
0001 | 0011 Final answer (two digits)
decimal adjust
15. 15
• Boolean algebra is a mathematical system for the manipulation of
variables that can have one of two values.
• In formal logic, these values are “true” and “false.”
• In digital systems, these values are “on” and “off,” 1 and 0, or “high” and
“low.”
• Boolean expressions are created by performing operations on
Boolean variables.
• Common Boolean operators include AND, OR, and NOT.
Boolean Algebra