Both the given molecules contain \(6\) carbon atoms with an aldehyde group, so these are called aldohexoses.
In \(X\), the \(- OH\) attached to second last carbon in on right hand side while in \(Y\) it is on left hand side, so \(X\) is \(D\) -sugar and \(Y\) is \(L\)-sugar.
\(X\) and \(Y\) are the mirror images of each other, i.e., these are enantiomers.
Carbohydrates, or carbs, are sugar molecules. Along with proteins and fats, carbohydrates are one of three main nutrients found in foods and drinks.
Your body breaks down carbohydrates into glucose. Glucose, or blood sugar, is the main source of energy for your body's cells, tissues, and organs. Glucose can be used immediately or stored in the liver and muscles for later use.
Carbohydrates are divided into two categories: simple and complex, based on their chemical structure and degree of polymerization.
One or two sugar molecules make up simple carbohydrates. Simple carbohydrates cause blood sugar levels to rise because molecules are easily digested and converted. Milk products, alcohol, vegetables, processed sugars, candies, and other foods contain a lot of them. These carbohydrates are referred to as "empty calories" because they lack fibre, vitamins, and minerals.
Starchy foods contain two or more sugar molecules and are thus referred to as complex carbohydrates. In comparison to simple carbohydrates, molecules in complex carbohydrates are digested and converted slowly. They are found in large quantities in potatoes, corn, cereals, lentils, peanuts, beans, whole-grain bread, peas, etc.