SlideShare ist ein Scribd-Unternehmen logo
1 von 9
Binarna aritmetika
Sabiranje binarnih brojeva
Osnovno pravilo za sabiranje binarnih brojeva:
0+0=0
0+1=1
1+0=1
1+1=10 pišemo 0 a pamtimo 1
1+1+1=11 pišemo 1 a pamtimo 1
1+1+1+1=100 pišemo 0 a pamtimo 10
Primjer 1.
Saberi binarne brojeve 111011 i 10111
111011
+ 10111
1010010
Zad.1. Saberi binarne brojeve:
a) 1011111 i 11110
b) 11101101 i 11111
Oduzimanje binarnih brojeva
U binarnom BS postupak oduzimanja brojeva svodimo na
sabiranje.
Oduzimanje vršimo kroz sljedeće korake:
1. ako umanjenik i umanjilac nemaju isti broj cifara umanjiocu
dodajemo onoliko nula koliko je potrebno da ih izjednačimo
2. umanjenik prepišemo
3. dodamo mu binarni komplement umanjioca (komplement se
dobije tako što se zamjene cifre tj. nule se zamjene
jedinicama, a jedinice nulama.)
4. dodamo broj 1
5. saberemo ta tri sabirnika
6. od dobijenog zbira oduzmemo prvu cifru 1
Primjer 1:
Oduzeti sljedeće binarne brojeve 10101 i 1100
10101 – 1100
01100 komplement je 10011
10101
+ 10011
1
101001
rezultat je 1001
umanjenik
umanjilac
Zad. 2.Oduzeti sljedeće binarne
brojeve:
a) 100111 i 10101
b) 10011 i 1110
Množenje binarnih brojeva
Postupak množenja binarnih brojeva je isti kao i
kod decimalnog BS. Svako broj se množi sa
svakim i na kraju se saberu po pravilu sabiranja
binarnih brojeva.
Zadaci:
1) 100111*101
2) 1110111*111
Dijeljenje binarnih brojeva
Postupak dijeljenja binarnih brojeva je isti kao i
kod decimalnog BS-a samo pri oduzimanju
koristimo pravila oduzimanja binarnih brojeva.
Zadaci:
1) 1000:10
2) 11011:11

Weitere ähnliche Inhalte

Empfohlen

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 

22_Binarna_aritmetika.pptx

  • 2. Sabiranje binarnih brojeva Osnovno pravilo za sabiranje binarnih brojeva: 0+0=0 0+1=1 1+0=1 1+1=10 pišemo 0 a pamtimo 1 1+1+1=11 pišemo 1 a pamtimo 1 1+1+1+1=100 pišemo 0 a pamtimo 10
  • 3. Primjer 1. Saberi binarne brojeve 111011 i 10111 111011 + 10111 1010010
  • 4. Zad.1. Saberi binarne brojeve: a) 1011111 i 11110 b) 11101101 i 11111
  • 5. Oduzimanje binarnih brojeva U binarnom BS postupak oduzimanja brojeva svodimo na sabiranje. Oduzimanje vršimo kroz sljedeće korake: 1. ako umanjenik i umanjilac nemaju isti broj cifara umanjiocu dodajemo onoliko nula koliko je potrebno da ih izjednačimo 2. umanjenik prepišemo 3. dodamo mu binarni komplement umanjioca (komplement se dobije tako što se zamjene cifre tj. nule se zamjene jedinicama, a jedinice nulama.) 4. dodamo broj 1 5. saberemo ta tri sabirnika 6. od dobijenog zbira oduzmemo prvu cifru 1
  • 6. Primjer 1: Oduzeti sljedeće binarne brojeve 10101 i 1100 10101 – 1100 01100 komplement je 10011 10101 + 10011 1 101001 rezultat je 1001 umanjenik umanjilac
  • 7. Zad. 2.Oduzeti sljedeće binarne brojeve: a) 100111 i 10101 b) 10011 i 1110
  • 8. Množenje binarnih brojeva Postupak množenja binarnih brojeva je isti kao i kod decimalnog BS. Svako broj se množi sa svakim i na kraju se saberu po pravilu sabiranja binarnih brojeva. Zadaci: 1) 100111*101 2) 1110111*111
  • 9. Dijeljenje binarnih brojeva Postupak dijeljenja binarnih brojeva je isti kao i kod decimalnog BS-a samo pri oduzimanju koristimo pravila oduzimanja binarnih brojeva. Zadaci: 1) 1000:10 2) 11011:11