gubernatorov00
?>

Выполнить перевод: 10101011, 011101 из двоичной системы в 16ричную

Информатика

Ответы

oksanamalakhova004610
Получаем число:
1010 1011 2 = AB16
Переводим дробную часть числа. Для этого разделим исходный код на группы по 4 разряда.
0111012 = 0111 01002
Затем заменяем каждую группу на код из таблицы.
Получаем число:
0111 01002 = 7416
В итоге получаем число: AB.7416
ответ: 10101011.011101=AB.7416
Nugamanova-Tatyana840

#include <iostream>

using namespace std;

class Building {

private:

 string adress_m;

 int storeyCount_m;

 bool quarantine_m;

public:

 Building(string adress = "", int count = -1) {

  adress_m = adress;

  storeyCount_m = count;

 }

 void addStoreys(int count) {

  storeyCount_m += count;

 }

 void quarantineOn() {

  cout << "Quarantine: on";

  cout << endl;

  quarantine_m = 1;

 }

 void quarantineOff() {

  cout << "Quarantine: off";

  cout << endl;

  quarantine_m = 0;

 }

 void quarantineCheck() {

  cout << "Quarantine: ";

  if(quarantine_m) {

   cout << "on";

   cout << endl;

  } else {

   cout << "off";

   cout << endl;

  }

 }

 string getAdress() {

  return adress_m;

 }

 int getStorey() {

  return storeyCount_m;

 }

};

int main() {

Building build("dirt house", 1);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

build.quarantineCheck();

build.quarantineOn();

build.addStoreys(2);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

}

Dmitriy2211104

#include <iostream>

using namespace std;

class Building {

private:

 string adress_m;

 int storeyCount_m;

 bool quarantine_m;

public:

 Building(string adress = "", int count = -1) {

  adress_m = adress;

  storeyCount_m = count;

 }

 void addStoreys(int count) {

  storeyCount_m += count;

 }

 void quarantineOn() {

  cout << "Quarantine: on";

  cout << endl;

  quarantine_m = 1;

 }

 void quarantineOff() {

  cout << "Quarantine: off";

  cout << endl;

  quarantine_m = 0;

 }

 void quarantineCheck() {

  cout << "Quarantine: ";

  if(quarantine_m) {

   cout << "on";

   cout << endl;

  } else {

   cout << "off";

   cout << endl;

  }

 }

 string getAdress() {

  return adress_m;

 }

 int getStorey() {

  return storeyCount_m;

 }

};

int main() {

Building build("dirt house", 1);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

build.quarantineCheck();

build.quarantineOn();

build.addStoreys(2);

cout << build.getAdress() << " " << build.getStorey() << " storeys" << " " << endl;

}

Ответить на вопрос

Поделитесь своими знаниями, ответьте на вопрос:

Выполнить перевод: 10101011, 011101 из двоичной системы в 16ричную
Ваше имя (никнейм)*
Email*
Комментарий*

Популярные вопросы в разделе

Aleksandrovich-Yurevna1421
grafffmc
smokestylemos
rozhkova
Mukhlaev-Olga
savva-vika
mansur071199486
ibswoklol1362
fymukham
Суховодова599
Виталий887
homeo85
Alekseeva_Khlistov
snk7777202
katcoffe3