Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Signal | Bitwise Operators and Shifts
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Bitwise Operations and Binary Logic in C

bookChallenge: Signal

Taak

Swipe to start coding

You are working with signal strength values and need to adjust them using bitwise operations. Implement two functions:

  • int increaseSignal(int value): increases the signal by shifting the value left by 1 bit;
  • int decreaseSignal(int value): decreases the signal by shifting the value right by 1 bit.

Follow these rules:

  • Use only the bitwise shift operators (<< and >>);
  • Do not use multiplication (*) or division (/);
  • Return the updated value from each function.

Oplossing

Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 3
single

single

Vraag AI

expand

Vraag AI

ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

Suggested prompts:

Can you explain this in simpler terms?

What are the main points I should remember?

Can you give me an example?

close

bookChallenge: Signal

Veeg om het menu te tonen

Taak

Swipe to start coding

You are working with signal strength values and need to adjust them using bitwise operations. Implement two functions:

  • int increaseSignal(int value): increases the signal by shifting the value left by 1 bit;
  • int decreaseSignal(int value): decreases the signal by shifting the value right by 1 bit.

Follow these rules:

  • Use only the bitwise shift operators (<< and >>);
  • Do not use multiplication (*) or division (/);
  • Return the updated value from each function.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 2. Hoofdstuk 3
single

single

some-alt