Semenova1719
?>

Сколько единиц в двоичной записи шестнадцатеричного числа вес216?

Информатика

Ответы

Allahverdi_Мария475
Заменяем каждую цифру шестнадцатиричного числа соответствующей двоичной тетрадой.
BEC2(16)=1011 1110 1100 0010(2)
В полученном числе девять единиц.
Альберт Луиза1595
BEC2(16)=11*16^3+14*16^2+12*16^1+2*16^0=45056+3584+192+2=48834(10)
48834(10)==1*2^{15}+0*2^{14}+1*2^{13}+1*2^{12}+1*2^{11}+1*2^{10}+1*2^9+0*2^8+1*2^7+1*2^6+0*2^5+0*2^4+0*2^3+0*2^2+1*2^1+0*2^0=1011111011000010(2)
Вот это правильный перевод
Yuliya_Viktoriya316

// C# 7.3

using System;

using System.Collections.Generic;

using System.Collections;

using System.Text;

namespace Rextester

{

   public class Program

   {

       public static void Main(string[] args)

       {

           var crypted = "";

 

           for (int i = 0; i < CaesarCipher.Ru.Length; i++)

               Console.WriteLine(CaesarCipher.Decode(i, crypted));

       }

   }

   

   class CaesarCipher

   {

       public static readonly string Ru = "";

       public static readonly string RuD = "";

       private static readonly int defaultStep = 3;

       public static CaesarEncrypted Encode(int step, string source, Func<string, string> translate)

       {

           string translatedData = translate(source);

           var stringBuilder = new StringBuilder();

           foreach (char c in translatedData.ToLower())

           {

               stringBuilder.Append(RuD[Ru.IndexOf(c) + step]);

           }

           return new CaesarEncrypted(step, stringBuilder.ToString());

       }

       public static CaesarEncrypted Encode(int step, string source)

       {

           return Encode(step, source, x => x);

       }

       public static string Decode(CaesarEncrypted source)

       {

           var step = source.Step;

           return Encode(-step + Ru.Length, source.ToString(), x => x);

       }

       public static string Decode(int step, string source)

       {

           return Encode(-step + Ru.Length, source, x => x);

       }

   }

   class CaesarEncrypted : IEnumerable, IEnumerable<char>

   {

       public int Step { get; set; }

       public string Data { get; set; }

       public CaesarEncrypted(int step, string initData)

       {

           Step = step;

           Data = initData;

       }

       public CaesarEncrypted(string initData) : this(int.MaxValue, initData)

       {}

       public IEnumerator<char> GetEnumerator()

       {

           foreach (char c in Data)

               yield return c;

       }

       IEnumerator IEnumerable.GetEnumerator() => (IEnumerator<char>)GetEnumerator();

       public override string ToString() => Data;

       public static implicit operator string(CaesarEncrypted source) => source.ToString();

   }

}

Kolosove5465
Var
День,Месяц:byte;
Begin
Write('№ дня = ');ReadLn(День);
Var C:=365-День;
Write('№ месяца = ');ReadLn(Месяц);
Case Месяц of
2:C:=C-31;
3:C:=C-59;
4:C:=C-90;
5:C:=C-120;
6:C:=C-151;
7:C:=C-181;
8:C:=C-212;
9:C:=C-243;
10:C:=C-273;
11:C:=C-304;
12:C:=C-334
End;
if (C mod 100>10)and(C mod 100<20) then Write('До нового года осталось ',C,' дней')
else
Case C mod 10 of
1:Write('До нового года остался ',C,' день');
2..4:Write('До нового года осталось ',C,' дня');
0,5..9:Write('До нового года осталось ',C,' дней')
End
End.

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

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

Сколько единиц в двоичной записи шестнадцатеричного числа вес216?
Ваше имя (никнейм)*
Email*
Комментарий*

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

kostmax1971
buff-studio
mnn99
minchevaelena23
oliayur4encko
verakmves
Asira926
universal21vek116
Камочкин
MelnikovaIvanovna
Litvin_Ivanov
alekseev13602
uzunanna19922488
Анна Елена
oshemkov579