‹%@ Page Language="C#" %›

‹!DOCTYPE html›
‹html lang="fr" xmlns="http://www.w3.org/1999/xhtml"›
‹head runat="server"›
        ‹meta charset="utf-8" /›
        ‹script src="../../../js/JQuery/jQuery3.3.1/jquery-3.3.1.min.js"›‹/script›
        ‹script src="../../../js/Bootstrap-3.3.7-dist/js/bootstrap.min.js"›‹/script›
        ‹link href="../../../js/Bootstrap-3.3.7-dist/css/bootstrap.css" rel="stylesheet" /›
        ‹title›‹/title›    
‹/head›

‹body style="background-color:#ffffff"›

‹%
    bool a = true;
    Byte value_a  = BitConverter.GetBytes(a)[0];
    bool b = false;
    Byte value_b  = BitConverter.GetBytes(b)[0];
%›

‹script runat="server"›

    private static string GetBinaryString(Byte value)
    {
        String retVal = Convert.ToString(value, 2);
        return new String('0', 8 - retVal.Length) + retVal;
    }

‹/script›


‹table class="table"›
    ‹thead›
        ‹tr›
            ‹th›Type‹/th›
            ‹th›MinValue‹/th›
            ‹th›MaxValue‹/th›
            ‹th›octet(s)‹/th›
            ‹th›Valeur‹/th›
            ‹th›Binaire‹/th›
            ‹th›Octal‹/th›
            ‹th›Décimal‹/th›
            ‹th›Héxadecimal‹/th›
        ‹/tr›
    ‹/thead›
    ‹tbody›
        ‹tr›
            ‹td›‹code›‹% = a.GetType() %›‹/code›‹/td›
            ‹td›‹code› - ‹/code›‹/td›
            ‹td›‹code› - ‹/code›‹/td›
            ‹td›‹code›‹% = sizeof(bool) %›‹/code›‹/td›
            ‹td›‹code›‹% = a %›‹/code›‹/td›
            ‹td›‹code›‹% = GetBinaryString(value_a) %›‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
        ‹/tr›
        ‹tr›
            ‹td›‹code›‹% = a.GetType() %›‹/code›‹/td›
            ‹td›‹code› - ‹/code›‹/td›
            ‹td›‹code› - ‹/code›‹/td›
            ‹td›‹code›‹% = sizeof(bool) %›‹/code›‹/td›
            ‹td›‹code›‹% = b %›‹/code›‹/td›
            ‹td›‹code›‹% = GetBinaryString(value_b) %›‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
            ‹td›‹code›-‹/code›‹/td›
        ‹/tr›
‹/tbody›
‹/table›

‹/body›
‹/html›