Binary coded decimal (BCD) is a method for representing decimal digits in binary form, with each decimal digit being represented by a 4-bit binary number. BCD is commonly used in digital clocks and calculators to store and display numbers in a human-readable decimal format. Algorithms are required for BCD addition, subtraction, multiplication, and division since standard binary arithmetic can produce invalid results. Addition and subtraction use BCD adders along with 9's complement generation, while multiplication uses an inner loop to perform multiple additions and decimal shifts. Division can be implemented with restoring or non-restoring algorithms using an inner loop for repeated subtraction and shifting.
Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. The four-bit BCD code for any particular single base-10 digit is its representation in binary notation
Binary coded decimal (BCD) is a system of writing numerals that assigns a four-digit binary code to each digit 0 through 9 in a decimal (base-10) numeral. The four-bit BCD code for any particular single base-10 digit is its representation in binary notation
Contents:
1.What is number system?
2.Conversions of number from one radix to another
3.Complements (1's, 2's, 9's, 10's)
4.Binary Arithmetic ( Addition, subtraction, multiplication, division)
Contents:
1.What is number system?
2.Conversions of number from one radix to another
3.Complements (1's, 2's, 9's, 10's)
4.Binary Arithmetic ( Addition, subtraction, multiplication, division)
Digital computer deals with numbers; it is essential to know what kind of numbers can be handled most easily when using these machines. We accustomed to work primarily with the decimal number system for numerical calculations, but there is some number of systems that are far better suited to the capabilities of digital computers. And there is a number system used to represents numerical data when using the computer.
Reviewing number systems involves understanding various ways in which numbers can be represented and manipulated. Here's a brief overview of different number systems:
Decimal System (Base-10):
This is the most common number system used by humans.
It uses 10 digits (0-9) to represent numbers.
Each digit's position represents a power of 10.
For example, the number 245 in decimal represents (2 * 10^2) + (4 * 10^1) + (5 * 10^0).
Binary System (Base-2):
Used internally by almost all modern computers.
It uses only two digits: 0 and 1.
Each digit's position represents a power of 2.
For example, the binary number 1011 represents (1 * 2^3) + (0 * 2^2) + (1 * 2^1) + (1 * 2^0) in decimal, which equals 11.
Octal System (Base-8):
Less commonly used, but still relevant in some computer programming contexts.
It uses eight digits: 0 to 7.
Each digit's position represents a power of 8.
For example, the octal number 34 represents (3 * 8^1) + (4 * 8^0) in decimal, which equals 28.
Hexadecimal System (Base-16):
Widely used in computer science and programming.
It uses sixteen digits: 0 to 9 followed by A to F (representing 10 to 15).
Each digit's position represents a power of 16.
Often used to represent memory addresses and binary data more compactly.
For example, the hexadecimal number 2F represents (2 * 16^1) + (15 * 16^0) in decimal, which equals 47.
Each number system has its own advantages and applications. Decimal is intuitive for human comprehension, binary is fundamental in computing due to its simplicity for electronic systems, octal and hexadecimal are often used for human-readable representations of binary data in programming, particularly when dealing with memory addresses and byte-oriented data.
Understanding these number systems is essential for various fields such as computer science, electrical engineering, and mathematics, as they provide different perspectives on how numbers can be represented and manipulated.
Explore the innovative world of trenchless pipe repair with our comprehensive guide, "The Benefits and Techniques of Trenchless Pipe Repair." This document delves into the modern methods of repairing underground pipes without the need for extensive excavation, highlighting the numerous advantages and the latest techniques used in the industry.
Learn about the cost savings, reduced environmental impact, and minimal disruption associated with trenchless technology. Discover detailed explanations of popular techniques such as pipe bursting, cured-in-place pipe (CIPP) lining, and directional drilling. Understand how these methods can be applied to various types of infrastructure, from residential plumbing to large-scale municipal systems.
Ideal for homeowners, contractors, engineers, and anyone interested in modern plumbing solutions, this guide provides valuable insights into why trenchless pipe repair is becoming the preferred choice for pipe rehabilitation. Stay informed about the latest advancements and best practices in the field.
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdffxintegritypublishin
Advancements in technology unveil a myriad of electrical and electronic breakthroughs geared towards efficiently harnessing limited resources to meet human energy demands. The optimization of hybrid solar PV panels and pumped hydro energy supply systems plays a pivotal role in utilizing natural resources effectively. This initiative not only benefits humanity but also fosters environmental sustainability. The study investigated the design optimization of these hybrid systems, focusing on understanding solar radiation patterns, identifying geographical influences on solar radiation, formulating a mathematical model for system optimization, and determining the optimal configuration of PV panels and pumped hydro storage. Through a comparative analysis approach and eight weeks of data collection, the study addressed key research questions related to solar radiation patterns and optimal system design. The findings highlighted regions with heightened solar radiation levels, showcasing substantial potential for power generation and emphasizing the system's efficiency. Optimizing system design significantly boosted power generation, promoted renewable energy utilization, and enhanced energy storage capacity. The study underscored the benefits of optimizing hybrid solar PV panels and pumped hydro energy supply systems for sustainable energy usage. Optimizing the design of solar PV panels and pumped hydro energy supply systems as examined across diverse climatic conditions in a developing country, not only enhances power generation but also improves the integration of renewable energy sources and boosts energy storage capacities, particularly beneficial for less economically prosperous regions. Additionally, the study provides valuable insights for advancing energy research in economically viable areas. Recommendations included conducting site-specific assessments, utilizing advanced modeling tools, implementing regular maintenance protocols, and enhancing communication among system components.
Water scarcity is the lack of fresh water resources to meet the standard water demand. There are two type of water scarcity. One is physical. The other is economic water scarcity.
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxR&R Consult
CFD analysis is incredibly effective at solving mysteries and improving the performance of complex systems!
Here's a great example: At a large natural gas-fired power plant, where they use waste heat to generate steam and energy, they were puzzled that their boiler wasn't producing as much steam as expected.
R&R and Tetra Engineering Group Inc. were asked to solve the issue with reduced steam production.
An inspection had shown that a significant amount of hot flue gas was bypassing the boiler tubes, where the heat was supposed to be transferred.
R&R Consult conducted a CFD analysis, which revealed that 6.3% of the flue gas was bypassing the boiler tubes without transferring heat. The analysis also showed that the flue gas was instead being directed along the sides of the boiler and between the modules that were supposed to capture the heat. This was the cause of the reduced performance.
Based on our results, Tetra Engineering installed covering plates to reduce the bypass flow. This improved the boiler's performance and increased electricity production.
It is always satisfying when we can help solve complex challenges like this. Do your systems also need a check-up or optimization? Give us a call!
Work done in cooperation with James Malloy and David Moelling from Tetra Engineering.
More examples of our work https://www.r-r-consult.dk/en/cases-en/
Welcome to WIPAC Monthly the magazine brought to you by the LinkedIn Group Water Industry Process Automation & Control.
In this month's edition, along with this month's industry news to celebrate the 13 years since the group was created we have articles including
A case study of the used of Advanced Process Control at the Wastewater Treatment works at Lleida in Spain
A look back on an article on smart wastewater networks in order to see how the industry has measured up in the interim around the adoption of Digital Transformation in the Water Industry.
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)MdTanvirMahtab2
This presentation is about the working procedure of Shahjalal Fertilizer Company Limited (SFCL). A Govt. owned Company of Bangladesh Chemical Industries Corporation under Ministry of Industries.
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Dr.Costas Sachpazis
Terzaghi's soil bearing capacity theory, developed by Karl Terzaghi, is a fundamental principle in geotechnical engineering used to determine the bearing capacity of shallow foundations. This theory provides a method to calculate the ultimate bearing capacity of soil, which is the maximum load per unit area that the soil can support without undergoing shear failure. The Calculation HTML Code included.
Democratizing Fuzzing at Scale by Abhishek Aryaabh.arya
Presented at NUS: Fuzzing and Software Security Summer School 2024
This keynote talks about the democratization of fuzzing at scale, highlighting the collaboration between open source communities, academia, and industry to advance the field of fuzzing. It delves into the history of fuzzing, the development of scalable fuzzing platforms, and the empowerment of community-driven research. The talk will further discuss recent advancements leveraging AI/ML and offer insights into the future evolution of the fuzzing landscape.
2. 2
Binary Coded Decimal
Introduction:
Although binary data is the most efficient
storage scheme; every bit pattern represents a
unique, valid value. However, some applications
may not be desirable to work with binary data.
For instance, the internal components of digital
clocks keep track of the time in binary. The
binary value must be converted to decimal
before it can be displayed.
3. 3
Binary Coded Decimal
Because a digital clock is preferable to store the
value as a series of decimal digits, where each
digit is separately represented as its binary
equivalent, the most common format used to
represent decimal data is called binary coded
decimal, or BCD.
4. 4
1. The BCD format
2. Algorithms for addition
3. Algorithms for subtraction
4. Algorithms for multiplication
5. Algorithms for division
Explanation of Binary Coded Decimal
(BCD):
5. 5
1) BCD Numeric Format
Every four bits represent one decimal digit.
Use decimal values
from 0 to 9
6. 6
4-bit values above 9 are not used in BCD.
1) BCD Numeric Format
The unused 4-bit values are:
BCD Decimal
1010 10
1011 11
1100 12
1101 13
1110 14
1111 15
7. 7
1) BCD Numeric Format
Multi-digit decimal numbers are stored as
multiple groups of 4 bits per digit.
8. 8
1) BCD Numeric Format
BCD is a signed notation
positive or negative.
For example, +27 as 0(sign) 0010 0111.
-27 as 1(sign) 0010 0111.
BCD does not store negative numbers in
two’s complement.
11. 11
2) Algorithms for Addition
Two errors will occurs in a standard
binary adder.
1) The result is not a valid BCD digit.
2) A valid BCD digit, but not the correct
result.
Solution: You need to add 6 to the result
generated by a binary adder.
12. 12
2) Algorithms for Addition
A simple example of addition in BCD.
0101
+ 1001
1110
+ 0110
1 0100
5
+ 9
Incorrect BCD digit
Add 6
Correct answer
1 4
13. 13
2) Algorithms for Addition
A BCD adder
1001
0101
0001 = 1
0100 = 4
If the result,
S3 S2 S1 S0, is
not a valid
BCD digit,
the multiplexer
causes 6 to be
added to the
result.
14. 14
A simple example of subtraction
3) Algorithms for Subtraction
0111
+ 1101
0100
(+7)
(- 3)
(+4)
0011 is 3, the one’s complement is 1100.
Each of the computations adds 1 to the one’s
complement to produce the two’s complement
of the number.
1100 + 1 = 1101
The two’s complement of 3 is 1101
15. 15
3) Algorithms for Subtraction
The second change has to do with
complements.
The nine’s complement in BCD, generated
by subtracting the value to be complemented
from another value that has all 9S as its digits.
Adding one to this value produces the ten’s
complement, the negative of the original value.
e.g, the nine’s complement of 631 is
999 – 631 = 368.
368 + 1 = 369 is the ten’s complement
16. 16
The ten’s complement plays the
subtraction and negation for BCD numbers.
3) Algorithms for Subtraction
Hareware generates the nine’s complement of a single BCD digit.
17. 17
Conclusion for addition and subtraction
Using a BCD adder and Nine’s complement
generation hardware to compute the addition
and the subtraction for signed-magnitude
binary numbers
The algorithm for adding and subtracting
as below:
PM’1: US XS, CU X + Y
PM1: CU X + Y’ + 1, OVERFLOW 0
PM’2: OVERFLOW C
18. 18
The algorithm for adding and subtracting
CZ’PM2: US XS
CZPM2: US 0 C’PM2: US X’S, U U’ + 1
2: FINISH 1
19. 19
Example of addition of BCD numbers
USU = XSX + YSY
XSX = +33 = 0 0011 0011
YSY = +25 = 0 0010 0101
PM’1: US 0, CU 0 0101 1000
PM’2: OVERFLOW 0
Result: USU = 0 0101 1000 = +58
20. 20
Example of subtraction of BCD numbers
USU = XSX + YSY
XSX = +27 = 0 0010 0111
YSY = -13 = 1 0001 0011
PM1: CU 1 0001 0100, OVERFLOW 0
CZ’PM2: US 0
Result: USU = 0 0001 0100 = +14
21. 21
4) Algorithms for Multiplication
1101 Multiplicand M
X 1011 Multiplier Q
1101
1101
0000
1101____
10001111 Product P
23. 23
4) Algorithms for Multiplication
Required to use the BCD adder and nine’s
complement circuitry.
In BCD, each digit of the multiplicand may have
any value from 0 to 9; each iteration of the loop
may have to perform up to nine additions. We
must incorporate an inner loop in the algorithm
for these multiple additions.
In addition, use decimal shifts right
operation (dshr), which shift one BCD digit,
or four bits at a time.
24. 24
The BCD multiplication algorithm
1: US XS+YS, VS XS+YS, U 0, i n, Cd 0
ZY0’2: CSU CdU + X, Yd0 Yd0 – 1, GOTO 2
ZY02: i i - 1
3: dshr (CdUV), dshr (Y)
Z’3: GOTO 2
ZT3: US 0, VS 0
Z3: FINISH 1
4) Algorithms for Multiplication
26. 26
Division can be implemented using either a
restoring or a non-restoring algorithm. An
inner loop to perform multiple subtractions
must be incorporated into the algorithm.
5) Algorithms for Division
10
11 ) 1000
11_
10
27. 27
5) Algorithms for Division
A logic circuit arrangement implements the
restoring-division technique
29. 29
5) Algorithms for Division
The restoring-division algorithm:
S1: DO n times
Shift A and Q left one binary position.
Subtract M from A, placing the answer back in A.
If the sign of A is 1, set q0 to 0 and add M back
to A (restore A); otherwise, set q0 to 1.
30. 30
5) Algorithms for Division
The non-restoring division algorithm:
S1: Do n times
If the sign of A is 0, shift A and Q left one
binary position and subtract M from A;
otherwise, shift A and Q left and add M to A.
S2: If the sign of A is 1, add M to A.