Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Вивчайте Challenge: Signal | Bitwise Operators and Shifts
Bitwise Operations and Binary Logic in C

bookChallenge: Signal

Завдання

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.

Рішення

Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 3
single

single

Запитати АІ

expand

Запитати АІ

ChatGPT

Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат

close

bookChallenge: Signal

Свайпніть щоб показати меню

Завдання

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.

Рішення

Switch to desktopПерейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
Все було зрозуміло?

Як ми можемо покращити це?

Дякуємо за ваш відгук!

Секція 2. Розділ 3
single

single

some-alt